Not sure, any help? I'm using the new gamepass call functions..
local MarketplaceService = game:GetService("MarketplaceService") local Players = game:GetService("Players") local gamePassID = 836664 local function onPlayerAdded(player) local hasPass = false -- Check if the player already owns the game pass local success, message = pcall(function() hasPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamePassID) end) -- If there's an error, issue a warning and exit the function if not success then warn("Error while checking if player has pass: " .. tostring(message)) return end if hasPass == true then print(player.Name .. " owns the game pass with ID " .. gamePassID) player.Humanoid.WalkSpeed = 30 end end
Add this at the end of your code:
game:GetService('Players').PlayerAdded:Connect(onPlayerAdded)
And on your line 22, make player.Humanoid.WalkSpeed = 30
to
player.Character.Humanoid.WalkSpeed = 30