Title explains everything. How would I make a part where, if I touched said part, your player would automatically move (without touching any keys) to the set location? I'm not talking about teleporting a player to a location btw, I'm talking about having the player walking to desired location. Thanks!
For this example i put the script in the part
script.Parent.Touched:Connect(function(hit) --checks parent(Part) for touching and puts the part that touched it into a variable called hit if hit.Parent:FindFirstChildOfClass("Humanoid") then --checks if the part is the part of a players character local Position = Vector3.new(5,5,5) --the position that you want to teleport to(5,5,5 is just for example). To get the position you want to teleport to you can move a brick there and copy the Position property or put YourPartName.Position as the Position variable to teleport to a part hit.Parent:MoveTo(Position) --Move the character to the position you choosed end end)
Wiki Pages:
I put alot of time and effort into writing these answers and would really appreciate if you accepted my answer as the solution(if it worked. Please comment if it didn't soo i can change it to make it work) and upvoted it
Most of my answers are tested in Roblox Studio and should work
part.Touch:Connect(function(hit) local desired_position = -- *Position of the place or part*-- character.Humanoid:MoveTo(desired_position) end)