I know how to teleport a person and there are many scripts that do that, but I'm trying to teleport a ball when it touches an object named ground it will teleport me back to a certain position.
How to teleport a part ?
2 answers
ball = balllocationhere
ballname = "NameOfBallHere" --Change this to the name of the ball, make sure the name is unique.
script.Parent.Touched:connect(function(hit)
if hit.Name == ballname then
--Figure out the rest of the code from here
end)
I went ahead and threw down some beginning code for you. I don't know exactly what it is you're trying to do, so you'll have to figure out the rest, which should be pretty simple.
2 comments
Thank you so much, I have been trying to figure it out for ages but I'm new aha, really appreciate your answer, so happy now :P
No problem
Part.CFrame=CFrame.new()
For both the player and ball you can use this.
2 comments
Sorry, I'm new to scripting. I'm not sure if I'm doing the correct method for the use of that line, but I'm using function onTouch and my problem is it only works when the player is touching the part, where as I'm looking for the script to only work with the ball touches the part, thank you for the reply though !
Use an OnTouched connected function that will check to see if the name of the object it touches it the name of the Ball.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
The ball will teleport the player back to a certain position or it will teleport the ball?
Yeah, could you explain please?
It will teleport the player back to a certain position but thinking of it now I also need to teleport to ball or reset it to it's starting position.
"need to teleport the* ball"