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

Does FE on effects the gamepass?

Asked by 6 years ago
Edited 6 years ago

I was trying to make a walkspeed gamepass, but it did not work for some reason, is it because of FE on?

Here is the script [it's in ServerScriptService]

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)   
        if game.MarketplaceService:PlayerOwnsAsset(player, 4865295) then
        character.Humanoid.Walkspeed = 40
        end
    end)
end)

please someon help!

3 answers

Log in to vote
2
Answered by 6 years ago
Edited 6 years ago

Here, your problem is: You used PlayerOwnsAsset instead of using UserOwnsGamePassAsync. Also consider using :GetService().

Here's the code:

game.Players.PlayerAdded:Connect(function(player)

    player.CharacterAdded:Connect(function(character)   

        if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, 4865295) then

        character:WaitForChild("Humanoid").WalkSpeed = 40

        end

    end)

end)
0
it did not work RainbowBeastYT 85 — 6y
0
You should use the player's ID not the player instance on line 5. luachef 61 — 6y
0
it should say "game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, 4865295)" luachef 61 — 6y
0
I edited the code how did luachef said, I've forgot about it... AswormeDorijan111 531 — 6y
Ad
Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

The gamepass would be fine as it is a script inserted by the server, FE does not allow changes to be made by the client, however this is server-sided, so it should work fine. I'm not the best in Studio, though, so you might have to look at some one else for confirmation. If I helped, please make sure to upvote! It helps me out. -Doge Master

0
but my question is that why does my script does not work even though FE does not effect gampasses RainbowBeastYT 85 — 6y
Log in to vote
0
Answered by 6 years ago

You should use UserOwnsGamePassASync because if you use asset id, you mean like models, decals, shirts, etc.

0
but can you give the script? RainbowBeastYT 85 — 6y

Answer this question