My script is this below, there are no errors it's just not working. It is supposed to be an obby reward thing, once the player touches it they are rewarded with some Money. It isn't working for some reason.
local Goal = script.Parent
local function onModelTouched(part)
local character = game.Workspace.Player
local player = game.Players:GetPlayerFromCharacter(character)
player.WaitForChild("leaderstats").Money = player.WaitForChild("leaderstats").Money + 1
Goal.touched:Connect(onModelTouched)
end

7 comments
Never mind, it doesn't. It now says 18:17:05.315 - Workspace.Goal.MoneyonTouch:15: attempt to perform arithmetic on field 'Money' (a userdata value). I have no clue if this counts as requesting either. But if there is a way, how would I be able to fix this?
I edited it, re-paste it.
ok
It still isn't working, but I think I know what is wrong. Would it be that my leaderstat script is wrong?
Works fine for me, so probably. What does the output say?
It doesn't say anything for some reason
Put a print after each if statement and see what prints and what doesn't. Doesn't make any sense that nothing is printing in your output.