When a player step on the button it says this..
'Processing PointsSErvice:AwardPoints response, but response is null. userId = 468978, exception is Forbidden Line 29 stack end'
Then the button breaks..
The last print is 'They need to get their points'
local PointsService = Game:GetService("PointsService")
local ting = 0
function onTouched(hit)
if ting == 0 then
ting = 1
print("It got past the tings")
check = hit.Parent:FindFirstChild("Humanoid")
if check ~= nil then
print("check is not nil")
local user = game.Players:GetPlayerFromCharacter(hit.Parent)
local stats = user:findFirstChild("leaderstats")
local universeBalance = PointsService:GetGamePointBalance(user.userId)
if stats ~= nil then
print("stats is not nil")
local award = stats:findFirstChild("Awarded")
print("Found total points awarded")
local bought = stats:findFirstChild("Bought")
print("Found total points bought")
local diference = bought.Value - award.Value
print("Found difference")
if award.Value < bought.Value then
print("They need to get their PlayerPoints")
PointsService:AwardPoints(user.userId, diference)
print("Awarded points" .. diference)
if universeBalance ~= award.Value then
print("They are have not got their Points")
bought.Value = awarded.Value
print("Updated bought value")
wait(5)
end
end
ting = 0
print("Ting back to 0")
end
end
end
end
script.Parent.Touched:connect(onTouched)

5 comments
1 of your mistakes are that you wrote :FindFirstChild() method wrong.Make sure the concepts wrote correctly and make sure you remember that Lua is case sensitive.
It might be a bit helpful if you helped me with what is wrong with the script... The part that is breaking the script.. That part doesn't break the script.
It does it's case sensitive.I'll come back later to check on it.
He's right about the capitalization of the method Kozero. The script isn't breaking due to the improper capitalization of the method, it's breaking somehow after the print.
And roblox is patching these scripts. So they wont work in the future, They already patched arceus's