Everytime I start the game I get a warning saying Infinite yield possible on 'ServerScriptService:WaitForChild("MathModule")'
m = require(game:GetService("ServerScriptService"):WaitForChild("MathModule")) local plr = game:GetService("Players").LocalPlayer while wait(2) do local cLevel = plr.leaderstats.Level.Value local cEXP = plr.leaderstats.EXP.Value local NLEXP = m.nextLevel(cLevel + 1) local nEXP = NLEXP - cEXP script.Parent.Text = "EXP to next level: "..nEXP end
"Infinite yield possible," is just saying that it has been multiple seconds, and the child hasn't been found yet. It might be that you made a typo somewhere when you were naming the "MathModule," or it might be that you referenced the wrong parent, and the child does not exist. Also, I think "ServerScriptService," doesn't exist when the game is actually running. Since it's probably a local script, you might have to do something creative with remote events to send something to a non-local script that has the same parent as the "MathModule" and do . . .
local mathModule = script.Parent:WaitForChild("MathModule")
To be honest, the easiest way would be to change the parent of the "MathModule" to something other than ServerScriptService if possible.