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

How can i make elseif because end underlines it?

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)

3 comments

0

Try doing it within the if conditional

0

hmm... ok

0

doesnt work either

1 answer

✓ Accepted answer

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.

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