Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

i have problems with my gamepass script can somewho help ?

so there was first a problem with character addd or so i got that error gone with wait but then it still does not work tried doing 2000 health for clearer results and it was indeed not working and there are no errors so i dont know whats the problem it may be how i made the health part but otherwise i dont know

local function giveGamepassPerks(player)

if player.character then 
	local humanoid = player.Character:WaitForChild ("humanoid")
	humanoid.Health = 200

end
player.Characteradded:connect(function(character)
	local humanoid = player.Character:WaitForChild ("humanoid")
	humanoid.Health = 200

end)

end

1 comment

0

oof, I hate these kinds of problems were there is not a error.

1 answer

There are a lot of errors in the capitalization of your script. But I'll help you fix them

local function giveGamepassPerks(player)
    if player.Character then 
        local humanoid = player.Character:WaitForChild ("Humanoid")
        humanoid.Health = 200

    end
    player.CharacterAdded:Connect(function(character)
        local humanoid = player.Character:WaitForChild ("Humanoid")
        humanoid.Health = 200

    end)
end

2 comments

0

k thanks

0

accept the answer if it answered your qn

This discussion is preserved as it was. New answers, comments, and votes are closed.