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

How do I get this Teleport Click Script to work?

Asked by 10 years ago

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)
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. Spongocardo 1991 — 10y
0
Is this in a LocalScript? NoahWillCode 370 — 10y
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.. Perci1 4988 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

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

Ad

Answer this question