Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does this script function when the values are both 0?

Heres the script:

while true do
	wait(0.1)
if game.ReplicatedStorage.GameValues.HomeScore.Value  ~= game.ReplicatedStorage.GameValues.AwayScore.Value and game.ServerStorage.ClockValues.per.Value == '3rd' or game.ServerStorage.ClockValues.per.Value == 'OT' then
game.Workspace.ResetTime:Remove()
local m = Instance.new("Message")	
m.Parent = workspace
m.Text = 'Game Over! Chat start to setup a new game!'
	wait(5)
	m:Remove()
	game.ReplicatedStorage.GameRunning.IsGameRunning.Value = false
end
end

1 comment

0

so how would I fix that lol can you make an answer

1 answer

On line 3 at the end of the code you did not put an integer value so roblox probably assumes it's 0

if game.ReplicatedStorage.GameValues.HomeScore.Value  ~=  -- The value that the script will function for

6 comments

0

it was like that

0

It will function when whatever number you put in is true, which it is

0

well the problem is its functioning when they both are 0

0

it should function when its 1-0 for one of the values

0

@Nifemiplayz It's just putting the code on the next line because there's not enough room.

0

he realized that ^

This discussion is preserved as it was. New answers, comments, and votes are closed.