Changing gravity for only one player

Alternate solution.

local part = workspace:WaitForChild("Part")

part.Touched:Connect(function(hit)
	if (hit.Parent:FindFirstChildWhichIsA("Humanoid"))  and (hit.Parent:FindFirstChild("Humanoid") == game.Players.LocalPlayer.Character:FindFirstChild("Humanoid"))  then
		if not workspace.Gravity ~= 100 then 
			workspace.Gravity = 100-- your new gravity here
		end
	end
end)

Both of the numbers should be the same.

This post is 7 months oldā€¦

In any case, what did you change?

All I did was add a not in your script. So instead of checking if the gravity is ___ it checks if the gravity is not ___, so you can add a lot of the same script over and over again for different areas without having to add if gravity = number and if gravity = number etc. etc. .

Uh, if workspace.Gravity ~= 100 then does exactly that. It only changes the gravity if the gravity is not 100, so once it is 100, the code will never run again. On the other hand, your inclusion of not means that the code will only run if the gravity of the workspace is 100, which isnā€™t helpful.

By the way the ~ in ~= means not equal to, not equal to. Unless I am missing somethingā€¦?

Did you find a solution on how to make gravity for one person?

They did. Check this.

They made it a solution so it must have worked.