Changed orginale script! Because i needs ServerScriptService and not workspace. Do you guys help me to fix it?
01 | local ting = 0 |
02 |
03 | function onTouched(hit) |
04 | if ting = = 0 then |
05 | ting = 1 |
06 | check = hit.Parent:FindFirstChild( "Humanoid" ) |
07 |
08 | if check ~ = nil then |
09 |
10 | local user = game.Players:GetPlayerFromCharacter(hit.Parent) |
11 | local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name) |
12 |
13 | if cashmoney ~ = nil then |
14 | cashmoney.Value = cashmoney.Value + 250 |
15 | end |
Line 11 - You use a nil value Change the 'player' to 'user' in line 11