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.
01 | script.Parent.Main.Button.MouseButton 1 Down:connect( function () |
02 |
03 | teleporter = script.Parent |
04 |
05 | if tp = = nil then |
06 | tp = teleporter.TeleportScript:Clone() |
07 | 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. |
08 | place = teleporter.PlaceId:Clone() |
09 | place.Parent = tp |
10 | destination = teleporter.DestinationSpawnName:Clone() |
11 | destination.Parent = tp |
12 | wait( 1.0 ) |
13 | tp.Disabled = false |
14 | else |
15 | wait( 1.0 ) |
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