Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Model Cloning script not working perfectly? Help fix please?

This script clones the model just like I want, but when it is cloned it falls apart. I tested it without cloning and it stays together, what is wrong?

script.Parent.MouseButton1Down:connect(function()
for _,v in pairs(game.Players:GetPlayers()) do

if v.leaderstats.Wood.Value >= 20 then
v.leaderstats.Wood.Value = v.leaderstats.Wood.Value - 20
local pt = game.ReplicatedStorage.Raft:Clone()
pt.Parent = workspace
pt.Position = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.p + Vector3.new(0,5,5) 
else return end
end
end)

1 answer

✓ Accepted answer

After line 7, add this line:

pt:MakeJoints()

What this method does is automatically connect parts based on their side formation (like studs, glue, weld) which sometimes fixes this kind of problem.

1 comment

0

thanks, worked perfectly

This discussion is preserved as it was. New answers, comments, and votes are closed.