Ad
Log in to vote
0

i have problems with my gamepass script can somewho help ?

Asked by 5 days ago
Edited 5 days ago

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

0
oof, I hate these kinds of problems were there is not a error. xxaxxaz 38 — 5d

1 answer

Log in to vote
0
Answered by 5 days ago

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
0
k thanks milian2008berlin 0 — 5d
0
accept the answer if it answered your qn Gmorcad12345 272 — 4d
Ad

Answer this question