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

How can i make elseif because end underlines it?

Asked by 3 years ago
Edited 3 years ago

Hello, Im trying to make a Rank script or stringvalue but i did an elseif it underlined end i tried to put another end but it didnt work. How can i make elseif?(btw its in scriptservice)

local function onPlayerJoin(player)
    if player.leaderstats.RankStats >= 1 then
        player.leaderstats.Rank.Value = "Rookie"
    end
end

game.Players.PlayerAdded:Connect(onPlayerJoin)
0
Try doing it within the if conditional JeffTheEpicRobloxian 258 — 3y
0
hmm... ok stevenfury91 -17 — 3y
0
doesnt work either stevenfury91 -17 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

try doing this:

local function onPlayerJoin(player)
    if player.leaderstats.RankStats >= 1 then
        player.leaderstats.Rank.Value = "Rookie"
    elseif

    end
end

game.Players.PlayerAdded:Connect(onPlayerJoin)

put elseif under the if statement without an end. you can do limitless elseif's by putting each elseif under an elseif. if you do an else, you end the whole if/elseif/else thing.

Ad

Answer this question