01 | local entrance = script.Parent |
02 |
03 | function tpcave() |
04 | local h = game.Workspace:FindFirstChild( "Humanoid" ) |
05 | local p = h.Parent |
06 | local torso = p.Torso |
07 | local reciever = game.Workspace.Reciever |
08 |
09 | torso.CFrame = CFrame.new(reciever.Position) |
10 | end |
11 |
12 | entrance.Touched:Connect(tpcave) |
It's pretty nooby and I tried to make it based off of a few things I saw in a teleport model I found online. Every time I touch the entrance, though it won't teleport me. Can someone show me what I'm doing wrong?
01 | -- *First, Get 2 different parts and put them to the location you want to teleport to* |
02 |
03 | -- *Also name both of the parts, "Telepad"* |
04 |
05 | -- *Insert a StringValue into both of the parts and change the value to one of them, "1" and the other one, "2"* |
06 |
07 | -- *Then, Add this script into both of the bricks.* |
08 |
09 |
10 | local Teleport_To_This_Tag = "1" -- *Set this value to the value in the teleporter* |
11 |
12 | function findTele(tag) |
13 | local tele = nil |
14 | function scan(p) |
15 | for _,v in pairs (p:GetChildren()) do |