I wrote my own script for teleporting. It doesn't work. What's wrong with it?
--Ok, so I am trying to make a teleport script. function h(part) local h = part.Parent.findFirstChild("Humanoid") if (h ~= no) then h.Parent.MoveTo(Workspace.SpawnLocation.Position + Vector 3. new (0,4,0) end end -- I don't know where I went wrong. A little help?
That's all wrong, this is not java! That's the fixed code:
yourPart.Touched:connect(part) local h = part.Parent:FindFirstChild("Humanoid") h.Parent:MoveTo(Workspace.SpawnLocation.Position + Vector 3. new (0,4,0)) end
Wow sorry it should be:
function AlessIsANoob(p) local h = p.Parent:findFirstChild("Humanoid") if (h ~= nil) then h.Parent:MoveTo(Workspace.PUT PART NAME HERE.Position + Vector3.new(0, 3, 0) end end script.Parent.Touched:connect(AlessIsANoob) -- he needs lessons(Aless) cause i didnt do java.