Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this script that welds all the parts to a part only work in studio, but not ingame?

Asked by 5 years ago

I made a script in a car, that welds all the parts in it to a part. It works perfectly in studio, but doesnt in game. Why is that?

script:

local parts = script.Parent:GetChildren()

for i = 1, #parts do
    if parts[i]:IsA("BasePart") then
        local w = Instance.new("Weld")
        w.Part0 = script.Parent.Parent.Chassis.d
        w.Part1 = parts[i]
        w.C0 = script.Parent.Parent.Chassis.d.CFrame:Inverse()
        w.C1 = parts[i].CFrame:inverse()
        w.Parent = script.Parent.Parent.Chassis.d
    end 
end

thank you

0
When you say that you have failed client to server replication. In other words, your game is not FilteringEnabled compatible. User#19524 175 — 5y

Answer this question