What do you want to achieve? Keep it simple and clear!
I was making a system where if i win it will show a comment of victory rate, if the score is under 3 and over 1 its victory if its under 5 and over 3 its flawless victory,
yes it is gui thing.
What is the issue? Include screenshots / videos if possible!
the comment text wont change on score even though i change the values to 4 it wont change, instead it still says “Victory” not “Flawless Victory”.
Heres The Code
local Comment = script.Parent
Event.OnClientEvent:Connect(function(TotalRedScore, TotalBlueScore)
if player.Team == game.Teams.RedTeam or game.Teams.RedTeamOther and TotalRedScore > TotalBlueScore then
if TotalRedScore >= 1 and TotalRedScore <= 3 then
Comment.Text = "VICTORY"
end
if TotalRedScore >= 3 and TotalRedScore <= 5 then
Comment.Text = "FLAWLESS VICTORY"
end
elseif player.Team == game.Teams.BlueTeam or game.Teams.BlueTeamOther and TotalRedScore < TotalBlueScore then
if TotalBlueScore >= 1 and TotalBlueScore <= 3 then
Comment.Text = "VICTORY"
end
if TotalBlueScore >= 3 and TotalBlueScore <= 5 then
Comment.Text = "FLAWLESS VICTORY"
end
end
end)
local Comment = script.Parent
local player = game.Players.LocalPlayer
Event.OnClientEvent:Connect(function(TotalRedScore, TotalBlueScore)
if player.Team == game.Teams.RedTeam or player.Team == game.Teams.RedTeamOther and TotalRedScore > TotalBlueScore then
Comment.Text = TotalRedScore <= 3 and "VICTORY" or TotalRedScore > 3 and "FLAWLESS VICTORY"
elseif player.Team == game.Teams.BlueTeam or player.Team == game.Teams.BlueTeamOther and TotalRedScore < TotalBlueScore then
Comment.Text = TotalBlueScore <= 3 and "VICTORY" or TotalBlueScore > 3 and "FLAWLESS VICTORY"
end
end)
local Comment = script.Parent
local player = game.Players.LocalPlayer
Event.OnClientEvent:Connect(function(TotalRedScore, TotalBlueScore)
if player.Team == game.Teams.RedTeam or player.Team == game.Teams.RedTeamOther and TotalRedScore > TotalBlueScore then
if TotalRedScore > 0 then
Comment.Text = TotalRedScore <= 3 and "VICTORY" or TotalRedScore > 3 and "FLAWLESS VICTORY"
end
elseif player.Team == game.Teams.BlueTeam or player.Team == game.Teams.BlueTeamOther and TotalRedScore < TotalBlueScore then
if TotalBlueScore > 0 then
Comment.Text = TotalBlueScore <= 3 and "VICTORY" or TotalBlueScore > 3 and "FLAWLESS VICTORY"
end
end
end)
local Teams = game:GetService("Teams")
local Comment = script.Parent
Event.OnClientEvent:Connect(function(TotalRedScore, TotalBlueScore)
if TotalRedScore > TotalBlueScore then -- First check which Team won
if player.Team == Teams.RedTeam or player.Team == Teams.RedTeamOther then -- Check if player is in the winning Team
if TotalRedScore >= 1 and TotalRedScore < 3 then
Comment.Text = "VICTORY"
elseif TotalRedScore >= 3 and TotalRedScore <= 5 then
Comment.Text = "FLAWLESS VICTORY"
end
end
else -- Blue Team won the round
if player.Team == Teams.BlueTeam or player.Team == Teams.BlueTeamOther then
if TotalBlueScore >= 1 and TotalBlueScore < 3 then
Comment.Text = "VICTORY"
elseif TotalBlueScore >= 3 and TotalBlueScore <= 5 then
Comment.Text = "FLAWLESS VICTORY"
end
end
end
end)
You can’t do both <= 3 and >= 3 when checking if the score is within a range, plus you were accidentally running both if statements after each other so they were interfering with the result