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

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

Asked by 4 years ago

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
0
so how would I fix that lol can you make an answer KronxGoat 50 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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
0
it was like that KronxGoat 50 — 4y
0
It will function when whatever number you put in is true, which it is Nifemiplayz 32 — 4y
0
well the problem is its functioning when they both are 0 KronxGoat 50 — 4y
0
it should function when its 1-0 for one of the values KronxGoat 50 — 4y
View all comments (2 more)
0
@Nifemiplayz It's just putting the code on the next line because there's not enough room. blarp_blurp645 63 — 4y
0
he realized that ^ KronxGoat 50 — 4y
Ad

Answer this question