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

Elseif not working with finding an intvalue's value?

Asked by 5 years ago
Edited 5 years ago

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

0
Sorry parts of the script are on the next line, it is the site. bluestreakejjp 41 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
elseif resval >= 0
0
Oh wow I'm dumb. Thanks. bluestreakejjp 41 — 5y
Ad

Answer this question