Hi! I have a localscript in startercharacterscripts that is supposed to lower a players gravity when they enter/touch a part (ZP_ForceFIed.OuterShell for example) and it works but it also lowers the gravity for anyone who isn't inside the zone which I do not want.. 😓. Apparently it's changing the workspace's gravity for everyone and I just don't know how to change it for one player.
#Low Gravity Help
1 messages · Page 1 of 1 (latest)
Is this a server script
he said its a localscript
local Players = game:GetService("Players")
Zone.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local player = Players:GetPlayerFromCharacter(hit.Parent)
if player == Players.LocalPlayer then
game.Workspace.Gravity = 30
end
end
end)```
Check if the hit part belongs to the character of the local player, and then apply the same logic for TouchEnded.
Thank you so much you fixed my problem!!!!!!
** You are now Level 2! **