Hello, In my game I am trying to make a extra health game pass witch gives you 200 health instead of 100. My script is not working do you have any ideas?
local id = 6751836 game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased) if purchased and ido == id then plr.Character.Humanoid.Health = 200 end end) game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:connect(function(char) if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players[char.Name].UserId, id) then game.Workspace:WaitForChild(plr.Name):WairForChild("Humanoid").Health = 200 end end) end)
You didn't put MaxHealth and You put "WairForChild" and not "WaitForChild". Here is the script:
local id = 6751836 game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased) if purchased and ido == id then plr.Character.Humanoid.Health = 200 end end) game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:connect(function(char) if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players[char.Name].UserId, id) then game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").MaxHealth = 200 game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").Health = 200 end end) end)