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

Elseif not working with finding an intvalue's value?

Hello,

I am making a gui thats color depends on a certain IntValue's value.

Here is my script

game.Players.LocalPlayer:WaitForChild("PlayerData",20)
game.Players.LocalPlayer.PlayerData:WaitForChild("RespectData",20)

local RS = game.Players.LocalPlayer.PlayerData.RespectData
script.Parent.Text = ("Pantaleon: "..game.Players.LocalPlayer.PlayerData.RespectData.PantaleonRespect.Value)

game.Players.LocalPlayer.PlayerData.RespectData.PantaleonRespect.Changed:Connect(function()
	
	local resval = game.Players.LocalPlayer.PlayerData.RespectData.PantaleonRespect.Value
	
	script.Parent.Text = ("Pantaleon: "..game.Players.LocalPlayer.PlayerData.RespectData.PantaleonRespect.Value)
	
	
	if resval < -10 then
		script.Parent.BackgroundColor3 = Color3.new(255, 0, 4)
	elseif resval => 0 then
		script.Parent.BackgroundColor3 = Color3.new(33, 255, 229)
	elseif resval > 10 then
		script.Parent.BackgroundTransparency = Color3.new(110, 255, 0)
	end 
	end)

In the part that says

elseif resval => 0 then

I get the red underline that says "Expected 'then', got '='".

Help would be appreciated.

Thanks,

Blue

1 comment

0

Sorry parts of the script are on the next line, it is the site.

1 answer

✓ Accepted answer
elseif resval >= 0

1 comment

0

Oh wow I'm dumb. Thanks.

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