
581 Views
63 Executions
Rbxmx loader the model goes to workspace
Universal Script 📌
7 months ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Rbxmx loader The model parents to workspace!
local function clean(value)
return value:match('<!%[CDATA%[(.-)%]%]>') or value
end
local function parseProperties(obj, block)
for propName, value in block:gmatch('<string name="(.-)">(.-)</string>') do
local val = clean(value)
if val and val:find("rbxassetid://") then
pcall(function() obj[propName] = val end)
end
end
for propName, value in block:gmatch('<Content name="(.-)">(.-)</Content>') do
local val = clean(value)
if val and val:find("rbxassetid://") then
pcall(function() obj[propName] = val end)
end
end
local cframeMatch = block:match('<CoordinateFrame name="Grip">(.-)</CoordinateFrame>')
if cframeMatch and obj:IsA("Tool") then
local x = tonumber(cframeMatch:match('<X>(.-)</X>'))
local y = tonumber(cframeMatch:match('<Y>(.-)</Y>'))
local z = tonumber(cframeMatch:match('<Z>(.-)</Z>'))
local rx = tonumber(cframeMatch:match('<R00>(.-)</R00>'))
local ry = tonumber(cframeMatch:match('<R01>(.-)</R01>'))
local rz = tonumber(cframeMatch:match('<R02>(.-)</R02>'))
local r10 = tonumber(cframeMatch:match('<R10>(.-)</R10>'))
local r11 = tonumber(cframeMatch:match('<R11>(.-)</R11>'))
local r12 = tonumber(cframeMatch:match('<R12>(.-)</R12>'))
local r20 = tonumber(cframeMatch:match('<R20>(.-)</R20>'))
local r21 = tonumber(cframeMatch:match('<R21>(.-)</R21>'))
local r22 = tonumber(cframeMatch:match('<R22>(.-)</R22>'))
if x and y and z then
local cf = CFrame.new(x, y, z,
r00, r01, r02,
r10, r11, r12,
r20, r21, r22
)
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







