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

My if statement cant know if my string value is on or off?

Asked by 5 years ago
Edited by User#5423 5 years ago

``` local RM = game.ReplicatedStorage.RMone

RM.OnServerEvent:Connect(function(plr) local ValueB = plr.Balloons

while wait(1.2) do
    if plr.Bool.Value == "On" then
        plr.leaderstats.Balloons.Value = plr.leaderstats.Balloons.Value + ValueB.Value
        plr.PlayerGui.PartyClown.TextLabel.Text = ValueB.Value
        plr.PlayerGui.PartyClown.TextLabel:TweenPosition(UDim2.new(0.655, 5,0.449, 0),"Out","Elastic",0.3,true)

        wait(0.6)
        plr.PlayerGui.PartyClown.TextLabel:TweenPosition(UDim2.new(0.5, 5,1, 0),"Out","Elastic",0.3,true)

    elseif plr.Bool.Value == "Off" then

        warn("Break")
        break
    end
end

end) ``` Help me I need some help,so i will explain what is happening in here so the Bool(Which is a string value idk why i name it bool)is "off" then a gui made it go "on" so the if bool.value == "On" dont work help me i cant event explain this also it dont even break,

0
It's likely because you don't know how while wait() do works. Just use while true do. DeceptiveCaster 3761 — 5y
0
Please format you code correctly. You will get more help from users. User#5423 17 — 5y

Answer this question