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
4 years ago
Edited 4 years ago
local localPlayer = game.Players.LocalPlayer

-- LOW GRAVITY PASS
local hasLowGravity = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(localPlayer.UserId, 9152138)  
if hasLowGravity then
-- ????
end

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 4 years ago

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

local localPlayer = game.Players.LocalPlayer

-- LOW GRAVITY PASS
local HasLowGravity = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(localPlayer.UserId, 9152138)  
if HasLowGravity then
    game.Workspace.Gravity = 100 -- change 100 to the gravity value.
end

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

Ad

Answer this question