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

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

Asked by 8 years ago
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.

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. dyler3 1510 — 8y

1 answer

Log in to vote
1
Answered by
dyler3 1510 Moderation Voter
8 years ago

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.

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. Supergamerboy1995 129 — 8y
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? Supergamerboy1995 129 — 8y
Ad

Answer this question