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

This script should send players to the towers and back to the lobby, yet it does not? (FIXED)

Asked by 4 years ago
Edited 4 years ago

Can anyone even know what is wrong with my code? I have checked and have no idea why it is not working. It worked in the past but i modified some of it and its not doing what i want. (Also no errors in the output)

I have changed the code several times yet its still not working, there is a bug with the ROBLOX lua or there is a flaw I don't even know it was there.

This script was supposed to send players from the lobby to 3 towers randomly, when times is finished it sends them back to the lobby, but it does not. Also the status is also not changing. (or really?)

Anyways, I want to give a thousand hugs to that person who managed to fix this.

The script that updates the gui and most importantly, sends the player to the towers and sends them back when the time runs out:

01local roundLength = 10
02local intermissionLength = 100
03local inRound = game.ReplicatedStorage.inRound
04local Status = game.ReplicatedStorage.Status
05 
06local TowerGenerator = math.random(1,3)
07local LobbySpawn = game.Workspace.Lobby.Floor.Center.SpawnLocation
08 
09local Normal = game.Workspace.Normal.Ground.Teleporter
10local MoltenCave = game.Workspace.MoltenCave.Ground.Teleporter
11local LavaFacility = game.Workspace.LavaFacility.Ground.Teleporter
12 
13inRound.Changed:Connect(function()
14    if inRound.Value == true then
15    TowerGenerator = math.random(1,3)
View all 50 lines...

And here is the script for the GUI for notifying players the status:

1local status = game.ReplicatedStorage.Status
2local TimerDisplay = script.Parent.TimerDisplay
3 
4status.Changed:Connect(function()
5    TimerDisplay.Text = status.Value
6end)

Anyways, thank you for reading this, it will make me improve my scripting skills.

0
nevermind i fixed it myself DecalMaker2468 21 — 4y

Answer this question