Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Walk speed game pass not working, no errors given, whats not right? [HELP NEEDED]

local id = 3672673475
local speed = 32
local gps = game:GetService("GamePassService")

game.Players.PlayerAdded:connect(function(plr)
plr:WaitForDataReady()
if not gps:PlayerHasPass(plr, id) then
	plr.CharacterAdded:connect(function(chr)
		chr:WaitForChild("Humanoid").Walkspeed = speed
end)
end
end)

This is the script i used. Its not a local script, and i put it in serverscriptservices.

1 comment

0

Hmm, I'm not really sure what the problem is at this point, if you say the gamepass is correct. Is there any errors in the output? Also, make sure you're testing this in a real server, not on Roblox Studio, that might be the problem.

1 answer

✓ Accepted answer

Your problem is simply that you're checking to make sure they don't have the gamepass. Just take out the not on line 7 and you code will work fine.

Also, you may just want to make sure the ID you put in was correct.


It should look like this:

local id = 3672673475
local speed = 32
local gps = game:GetService("GamePassService")

game.Players.PlayerAdded:connect(function(plr)
	plr:WaitForDataReady()
	if gps:PlayerHasPass(plr, id) then
		plr.CharacterAdded:connect(function(chr)
			chr:WaitForChild("Humanoid").WalkSpeed = speed
		end)
	end
end)

And now your code should work fine.


Anyways, I hope this helps. If you have any further problems/questions, please leave a comment below, and I'll see what I can do.

2 comments

0

Still not working. The game pass is correct, and also it's a regular server that I'm testing it in, not the studio test.

0

I've noticed that i misspelled WalkSpeed on line 9 as Walkspeed, so i changed it, and still it doesn't work. Could you help?

This discussion is preserved as it was. New answers, comments, and votes are closed.