Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I get this Teleport Click Script to work?

I keep getting problems with my SurfaceGui Teleporter. I have been reading the Output and it says... 02:58:22.150 - Script 'Workspace.TeleportSystemGui.SurfaceGui.ClickScript', Line 7

So here is the script.

script.Parent.Main.Button.MouseButton1Down:connect(function()

teleporter = script.Parent

if tp == nil then
tp = teleporter.TeleportScript:Clone() 
tp.Parent = script.Parent.Parent.Parent.Character -- I don't know what's wrong with it, no red wiggly lines. The script fails it and won't work.
place = teleporter.PlaceId:Clone()
place.Parent = tp
destination = teleporter.DestinationSpawnName:Clone()
destination.Parent = tp
wait(1.0) 
tp.Disabled = false 
else
wait(1.0)
tp.Disabled = true
wait(0.1)
tp.Disabled = false 
end

end)

3 comments

0

Could you give us more detail on the error in the output? The most likely cause is that either the Character doesn't exist or the TeleportScript doesn't exist.

0

Is this in a LocalScript?

0

That's only part of the output. That tells you where the error happens, but not what the error is. Please include all of it. It's likely that the character doesn't exist or your path is incorrect..

1 answer

Well, for the second comment = I am not sure if it has to be a Script or a LocalScript. But it's a Script.

Here is the full output written below.

The Full Output: 17:25:53.475 - Character is not a valid member of Workspace 17:25:53.477 - Script 'Workspace.TeleportSystemGui.SurfaceGui.ClickScript', Line 7 17:25:53.480 - Stack End 17:25:53.482 - Disconnected event because of exception

This discussion is preserved as it was. New answers, comments, and votes are closed.