Yeah i have no idea how to script and i was following a tutorial and everything worked out well till i added it to the game so i checked the output log and it said: Infinite yield possible on 'Players.Doodlyooo:WaitForChild("leaderstats")'
I have no idea what to do and this is part of the script
local player = game.Players.LocalPlayer local exp = player:WaitForChild("leaderstats"):WaitForChild("Exp") local axp = player:WaitForChild("leaderstats"):WaitForChild("ExpNeeded")
someone please help ^^ the full script- https://pastebin.com/Zr3ph050
Your error means that the method :WaitForChild()
has been waiting for an unusually long period of time, so you get a warning that what you want may not exist.
For you, all you need to do is create the leaderstats. Due to no leaderstats existing, I'll take a guess that Exp and ExpNeed also does not.
Try the below script; place it in ServerScriptService (not a local script):
game.Players.PlayerAdded:Connect(function(Plr) local L = Instance.new("Folder", Plr) L.Name = "leaderstats" local E = Instance.new("NumberValue", Plr.leaderstats) E.Name = "Exp" local EN = Instance.new("NumberValue", Plr.leaderstats) EN.Name = "ExpNeeded" L, E, EN = nil, nil, nil end)