I'm making a teleporter for a safezone in my game. When you hold an item though and try going INTO the teleporter, it puts an error in the output saying "moveTo is not a valid member of Tool "Workspace.EmmaMallen.Teleporter", and I tried everything fixing it though it doesn't work.
here's the script.
local TeleportTarget = "Teleporter2"
function Touch(hit)
if script.Parent.Locked == false and script.Parent.Parent:findFirstChild(TeleportTarget).Locked == false then script.Parent.Locked = true script.Parent.Parent:findFirstChild(TeleportTarget).Locked = true
local Pos = script.Parent.Parent:findFirstChild(TeleportTarget)
hit.Parent:moveTo(Pos.Position) wait(1) script.Parent.Locked = false script.Parent.Parent:findFirstChild(TeleportTarget).Locked = false end end
script.Parent.Touched:connect(Touch)

11 comments
Connection is not a valid member of RBXScriptSignal, what does it mean?
Uh oh, i made a spelling error! I meant Connect, fix that spelling mistake or copy the edited script.
Pssst.. If this helped mark it as the answer pls i wanna watch numbers on a screen go up
Sure.
Oh also, I found out that the S in script at line 7 is spelled with a capital. Is that good?
its meant to be lowercase im pretty sure.
Oh, it still doesn't teleport me, what's the bad thing?
What errors?
You could try replacing Player.Character:moveTo(TeleportTarget.Position) with Player.Character.HumanoidRootPart(TeleportTarget.Position)
Could work!
Still doesn't work for some reason, there aren't any output messages and I am officially confused. (the type is R6 and i replaced HumanoidRootPart with torso.)