I have a button that changes another button to be active if the player wants to turn the gamepass off in game, in the setting I made. How do I make it loop to constantly check if its Active so when they turn it on, it works right away. How can I use this script to do that, do I just put a loop in it?
local id = 5348469
game.Players.PlayerAdded:Connect(function(player)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, id) then
if script.Parent.Active == true then
local player = game.Players.LocalPlayer
local char = player.Character
char.Humanoid.MaxHealth = 500
char.Humanoid.Health = 500
end
else
end
end)

4 comments
It didn't change the health.
But there are no errors.
Hmm, is it in a normal script? Cant be placed in a local script.
Can you just give me a link to download the place file so i can see what your issue is? this should've worked