I created a script that moves a model and the player that clicks the button to a specific position (10,1.5,10). However, the script I have made does not work.
script.Parent.ClickDetector.MouseClick:connect(function(plr)
if plr.Parent:FindFirstChild("Humanoid") then
script.Parent.Parent:SetPrimaryPartCFrame(CFrame.new(10,1.5,10))
plr.Parent.Torso.CFrame = script.Parent.Parent.Seat.CFrame
end
end)
There are no errors in the output. Can anybody help?

1 comment
Thanks a lot.