So, I'm using Berezaa's tycoon kit, and it saves the money inside of serverstorage. I wrote this script to try to give +10000 cash if the player has the gamepass, but it won't do anything.
(And yes, I do have the ID defined, it's just in the very first part of the script)
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if game:GetService("GamePassserivce"):PlayerHasPass(player, id) then
local swag = game.ServerStorage.MoneyStorage.Player.Value
swag = swag + 10000
end
end)
end)

1 comment
On line 5 you used Player with a capital P but in line one the functions argument is player with a lower case p