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
I don't know, tell us what you wanted to happen and what actually happened