I've got a double jump gamepass script that doesn't seem to be working can someone explain? heres the code: local passId = 4916610 --Change to you're Game Pass ID. game.Players.PlayerAdded:connect(function() function isAuthenticated(player) -- checks to see if the player owns your pass return game:GetService("GamePassService"):PlayerHasPass(player, passId) end
game.Players.PlayerAdded:connect(function(plr) if isAuthenticated(plr) then repeat wait(0.001) until game.Players.LocalPlayer.Character.Humanoid game.Players.LocalPlayer.Character.Humanoid.JumpPower = game.Players.LocalPlayer.Character.Humanoid.Power + 30---Change this line to what you want the Game Pass to do. end end)
end)
LocalPlayer
is nil
on the server. You're also looking for a property called Power
in the Humanoid
, when no such property exists. Also, the PlayerHasPass
method has been broken due to the new game pass update. You'll want to use the UserOwnsGamePassAsync
method of the MarketplaceService
.local passId = 4916610 local MPS = game:GetService("MarketplaceService") local function isAuthenticated(userId, gamePassId) -- define outside the PlayerAdded event return MPS:UserOwnsGamePassAsync(userId, gamePassId) end game:GetService("Players").PlayerAdded:Connect(function(plr) -- :connect is deprecated, use :Connect plr.CharacterAdded:Connect(function(char) -- wait for the character! if isAuthenticated(plr.UserId, passId) then char.Humanoid.JumpPower = char.Humanoid.JumpPower + 30 end end) end)