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

Why isn't my sword fighting mainscript not working properly?

Asked by 5 years ago

So in this MainScript, I'm experiencing some issues. I looked at the output and everything seems fine, but when I tested it out, things weren't working. The game wasn't function properly. 2 players joined in, and they were getting teleported in and out of the lobby to the map in a short time and the GUI was announcing people winning in a matter of seconds. No one was even fighting or killing.

Thanks in advance!

Below is a server script inside ServerScriptStorage, named "MainScript"

001-- VARIABLES!
002 
003local ReplicatedStorage = game:GetService("ReplicatedStorage")
004 
005local ServerStorage = game:GetService("ServerStorage")
006 
007local MapsFolder = ServerStorage:WaitForChild("Maps")
008 
009local Status = ReplicatedStorage:WaitForChild("Status")
010 
011local GameLegnth = 50
012 
013local reward = 25
014 
015-- Game loop
View all 164 lines...
0
Did you put a wait(1) in your GameLength for loop ? If not, the countdown will go to 0 immediately unless there is one present. laughablehaha 494 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

instead of doing "while true do" do "while wait(1") do"

Ad

Answer this question