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

How do I turn off the teleporter when winner is found?

Asked by 9 years ago

I tried to disable the teleporter script but it looks like its not working. I tried game.Workspace.TpScript.Disabled = true but it keeps sending player to the map. Heres the main script that makes it to be disabled :

01--start
02local Player1 = game.Players.PlayerAdded:wait()
03--variables
04Map1 = game.ServerStorage.Maps.Arena1
05NotificationGui1 = game.Workspace.StatusBar.Gui1.TextBox
06NotificationGui2 = game.Workspace.StatusBar.Gui2.TextBox
07 
08Winner = "None"
09WinnerFound = false
10 
11 
12game.Workspace.WinnerDetector.Touched:connect(function(Player)
13    WinnerFound = true
14    Winner = Player.Parent.Parent.Name
15    Player.Parent.Humanoid.Health = 0
View all 54 lines...

and the TpScript :

01--Reciver Vars
02Spawn1o = 0
03Spawn2o = 0
04Spawn3o = 0
05Spawn4o = 0
06Spawn5o = 0
07Spawn6o = 0
08enabled = true
09Reciver = game.Workspace.Spawn.Spawn1
10game.Workspace.TpSender.Touched:connect(function(part)
11local hum = part.Parent:FindFirstChild("Humanoid")
12    if hum~=nil then
13        if enabled == true then
14            enabled = false
15            local t = part.Parent:FindFirstChild("Torso")
View all 38 lines...
0
just check if user is at specific location and then print running other condition, otherwise running main feature. scottmike0 40 — 9y
0
This is for minigame script so its hard enough to use specific location. krisxxxz 45 — 9y
0
Do you want to completely disable it ? (If so, set to true @ line 31 of the main script ) Vitou 65 — 9y
0
I want it to disable when winner is found. But I don't know how to make it work. If I change the line 31 to be true then it won't turn on when round starts. krisxxxz 45 — 9y

Answer this question