I made a previous post but I found the answer myself shortly after. All I have to do is inverse a function of mine. However, this inverse function has a square root in it, and sqrt won't work in my script
NOTE: The problem is on line 14, I'm only adding the rest for context
game.Players.PlayerAdded:connect(function(plr)
local stats = Instance.new('IntValue', plr)
stats.Name = 'leaderstats'
local experience = Instance.new('IntValue', stats)
experience.Name = 'EXP'
experience.Value = 0
local level = Instance.new('IntValue',stats)
level.Name = 'Level'
level.Value = 1
experience.Changed:connect(function()
local q = experience.Value
local p = level.Value
level.Value = math.floor((1/2) + ((1/10) * sqrt(2*q - 175))
end)
end)
The first end is underlined in red. If I add another close parenthesis at the end of line 14 then sqrt is underlined in blue. Can't seem to find the problem

2 comments
If sqrt is underlined in blue, it hasn't been indexed. Obviously, then, sqrt is not a proper function.
Well then what function is square root?