how do i make a telepory script please tell me.
I didn't know what event you wanted to use so I assume it's the most common event to use when making a Teleporter.
script.Parent.Touched:connect(function(Player)-- Activate the Script whenever an Object touches the Part. local Humanoid = Player.Parent:FindFirstChild("Humanoid")-- This prevent other object like "Part" from being "CFramed" if Humanoid then Player.Torso.CFrame = CFrame.new(x,y,z)-- Replace X,Y,Z with your actual coordinates. end end)
If you want to know about the Functions and Events I used then I suggest going to these links: Parameters Touched CFrame
If you want me to explain anything I wrote in further detail the feel free to leave a comment or too. If I helped you answer your question then I would appreciate it if you good "Accept" my answer.
hmm.. you can also teleport the player to another part! (easier to change)
local PartToTeleportTo = script.Parent.PartToTeleportTo --This Part has to be in A model with this script and the other teleporter! P = script.Parent P.Touched:connect(functio(plr) --this will run the function bellow when script.Parent is Touched local Humanoid = plr.Parent:FindFirstChild("Humanoid") --plr.Parent let the script look to the thing that touched the teleporter it's Parent. It will search for an Humanoid if Humanoid then if plr.Parent.Parent.Parent == game.Players then --(if broken remove this game.) Player.Torso.CFrame = CFrame.new(PartToTeleportTo.Position) end end end)
Closed as Not Constructive by AmericanStripes
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?