This is meant to change the player's max health but it doesn't work... Any help? Here's the script:
gps = Game:GetService("GamePassService")
gpid = 190345440 --Put the gamepass ID here
function respawned(char)
player = game.Player:FindFirstChild(char.Name)
if char:FindFirstChild("Head") ~= nil then
if gps:PlayerHasPass(player, gpid)then
function charHealth(char)
human = char:FindFirstChild("Humanoid")
if human then
human.MaxHealth = human.MaxHealth+100
human.health = human.Health+100
end
end
end
end
end)
game.Players.PlayerAdded:connect(function(plyr) plyr.CharacterAdded:connect(charHealth) end)
