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

Does FE on effects the gamepass?

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

✓ Accepted answer

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)

4 comments

0

it did not work

0

You should use the player's ID not the player instance on line 5.

0

it should say "game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, 4865295)"

0

I edited the code how did luachef said, I've forgot about it...

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

1 comment

0

but my question is that why does my script does not work even though FE does not effect gampasses

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

1 comment

0

but can you give the script?

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