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

How Can I Change a Specific Player's Gravity?

Asked by
Borrahh 265 Moderation Voter
5 years ago
Edited 5 years ago
1local localPlayer = game.Players.LocalPlayer
2 
3-- LOW GRAVITY PASS
4local hasLowGravity = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(localPlayer.UserId, 9152138
5if hasLowGravity then
6-- ????
7end

So Basically, if the player has Gamepass (I have done that already) But How Would I Need to script to change a player's Gravity (not everyone's in the game)

1 answer

Log in to vote
0
Answered by 5 years ago

First off, this isn't a script request site. But I will give it to you anyways.

1local localPlayer = game.Players.LocalPlayer
2 
3-- LOW GRAVITY PASS
4local HasLowGravity = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(localPlayer.UserId, 9152138
5if HasLowGravity then
6    game.Workspace.Gravity = 100 -- change 100 to the gravity value.
7end

Make sure the script is a Local Script and it is located it StarterCharacterScripts.

Ad

Answer this question