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

I want to make a level.. system.. but why it isn't working?

The code in a normal script:

--working
game.Players.PlayerAdded:Connect(function(plr)	
	wait()
	plr.Chatted:connect(function(msg)
		if msg == "/e dance" or msg == "/e dance2" or msg == "/e dance3" then
			plr.leaderstats.XP.Value = plr.leaderstats.XP.Value + plr.leaderstats.Levels.Value
			repeat
				plr.leaderstats.XP.Value = plr.leaderstats.XP.Value + 10
				wait(5)
			until plr.Character.HumanoidRootPart.Velocity.Magnitude >= 2
		end
	end)
--not working
while plr.leaderstats.XP.Value >= 100 do
game.ReplicatedStorage.LevelUp:FireServer()
break
end	
end)

Output is empty... What did i wrong?

1 comment

0

I don't know, tell us what you wanted to happen and what actually happened

1 answer

Sorry but idk why i cant edit the question and i cant make a comment, The not working thing will make the xp value to 0, and add a level value, but it wont works

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