This is kinda killing players when they touch the part.
part = script.Parent function Touched (char) char.Position = Vector3.new(10,10,10) end script.Parent.Touched:connect(Touched)
Try Using the moveto function:
part = script.Parent cords = 10, 10, 10 -- put cords here local Human = char.Parent:FindFirstChild("Humanoid") local Player = char.Parent function Touched (char) Player:MoveTo(Vector3.new(cords)) end script.Parent.Touched:connect(Touched)
Hope i help!
Please accept this answer:
It may have to do with humanoid that you got.
What part of the character are you moving? I would use CFrame on the Torso. That will tp the player to anywhere you want without killing them in the process.
Use :MoveTo()
part = script.Parent function Touched (char) char:MoveTo(10,10,10) end script.Parent.Touched:connect(Touched)
Unfortunately the method you used to move the character unfortunately moved the character's limbs using the Position property, breaking all joints and killing the player's character.
local coords = CFrame.new(0,10,0) script.Parent.Touched:connect(function(hit) if hit then if hit.Parent then if hit.Parent:FindFirstChild('Humanoid') then if hit.Parent.Humanoid.Torso then hit.Parent.Humanoid.Torso.CFrame = coords end end end end end)
The above code is meant to teleport a player to the specified coordinates without unexpectedly teleporting them on top of a building if you wanted to teleport them inside. That's the problem with MoveTo()
and Position
.
I hope you find my answer helpful, I live to help (not really).