Changed orginale script! Because i needs ServerScriptService and not workspace. Do you guys help me to fix it?
local ting = 0 function onTouched(hit) if ting == 0 then ting = 1 check = hit.Parent:FindFirstChild("Humanoid") if check ~= nil then local user = game.Players:GetPlayerFromCharacter(hit.Parent) local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name) if cashmoney ~= nil then cashmoney.Value = cashmoney.Value + 250 end end ting = 0 end end script.Parent.Touched:connect(onTouched)
Line 11 - You use a nil value Change the 'player' to 'user' in line 11