I have this script that adds Health when they join my game is they have a certain Game pass. It works perfectly. There is one problem though when they get the health it doesn't put it at that health. As in it puts the max health there but they haven't healed yet so it is still 100 health. I was wondering how I could edit the script to put there health to 250 when it is done changing the max health. (Healing them to the max health) Script:
local gps = game:GetService("GamePassService");
local id = script:WaitForChild("GamePassID");
local Health = script:WaitForChild("ExtraHealthAmount");
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(char) --CharacterAdded event
char:WaitForChild("Humanoid") --Just to be safe(;
if gps:PlayerHasPass(Player , id.Value) then
local hum = Player.Character.Humanoid
hum.MaxHealth = hum.MaxHealth + Health.Value
end
end)
end)
If you could help it would be really nice. THANKS!

2 comments
Thanks, I was JUST thinking that when I got on cod!
lol :D