teleportpositon = CFrame.new(241.999, 43,607, 318)
script.Parent.ClickDetector.MouseClick:Connect(function(player)
wait (5)
script.Parent.Parent.Model.PART1.CanCollide = true
script.Parent.Parent.Model.Part.CanCollide = true
print ("elevator going up")
if game.Workspace[player.Name]:FindFirstChild("Humanoid") then
playerWhoClicked.parent.HumanoidRootPart.CFrame = teleportpositon
end
end)
I would like to make an elevator but it won't work can you help?

1 comment
The PlayerWhoClicked is already set to the character. On line 08, remove the .Parent after PlayerWhoClicked