Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can I have help with my nooby teleport script?

Asked by 7 years ago
01local entrance = script.Parent
02 
03function 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)
10end
11 
12entrance.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?

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago
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 
10local Teleport_To_This_Tag = "1"    -- *Set this value to the value in the teleporter*
11 
12function findTele(tag)
13    local tele = nil
14    function scan(p)
15        for _,v in pairs(p:GetChildren()) do
View all 41 lines...
0
Whoops it's all bunched up together, Here, I'll fix it. LennonLight 95 — 7y
Ad

Answer this question