So im making this little script, and i got this so far, but its giving me this error, i even tried to add the tonumber part to make it work, no success, any help?
GiveSkin.OnServerEvent:Connect(function(Player, Number, Price)
local pm = tonumber(Player:WaitForChild("stats"):WaitForChild("Cash").Value)
if pm >= Price then
print("camo server received")
notify(Player,Price)
Player:WaitForChild("stats"):WaitForChild("Camo").Value = Number
print("gave camo value to player")
else
notifybad(Player)
end
end)
GiveSkin.OnServerEvent:Connect(function(Player, Number, Price)
Price = tonumber(Price)
local pm = tonumber(Player:WaitForChild("stats"):WaitForChild("Cash").Value)
if pm >= Price then
print("camo server received")
notify(Player,Price)
Player:WaitForChild("stats"):WaitForChild("Camo").Value = Number
print("gave camo value to player")
else
notifybad(Player)
end
end)