Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

i have problems with my gamepass script can somewho help ?

Asked by 3 years ago
Edited 3 years 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 42 — 3y

1 answer

Log in to vote
0
Answered by 3 years 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 — 3y
0
accept the answer if it answered your qn Gmorcad12345 434 — 3y
Ad

Answer this question