Im making a deployable ladder. I have a script that should clone the preview to the player. But for some reason all the models in a folder in the tool appear in workspace when the tool is equipped.
All these models appear in the workspace when I equip the tool
This is the script that should cclone only one of the previews
local tool = script.Parent
local p1 = script.Parent.Previews.PStage1
local plr = game.Players.LocalPlayer
local char = plr.Character
local equipped
tool.Equipped:Connect(function(mouse)
equipped = true
p1.Parent = workspace
while wait(0.1) and equipped == true do
p1.CFrame = CFrame.new(char.HumanoidRootPart.CFrame)
end
end)
tool.Unequipped:Connect(function(mouse)
equipped = false
p1.Parent = script.Parent.Previews
end)