Why is this double walkspeed script not working?

Why is my double walkspeed script not working? I have the correct game pass id in there and there are no errors in the out put. What’s the deal with this script not working?
Does anybody know what I did wrong here?

-- Script
local gamepassID = 10199952
local moveSpeed = 32

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserID, gamepassID) then
			character:WaitForChild("Humanoid").WalkSpeed = moveSpeed
		end
	end)
end)

Does anybody know what I did wrong?

1 Like

Spelling in the first line?
ocal?

I put local but I forgot to put that there.

Does anybody know what I did wrong???

Firstly, check the WalkSpeed property of humanoid.
Secondly try outputing this just in case.

print(game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserID, gamepassID))

Have you tried debugging this?

No I haven’t. I haven’t yet. I will do that tomorrow.

it should be player.UserId not capital “ID”

2 Likes

Okay, I will try that. Hopefully it works!

Thank you! It worked. Thank you.

1 Like