Oh, okay. A few questions before I use it, can you stay on a planet but not walk on top of walls, and can you make “Gravity Zones”, like I originally wanted?
After testing it, I think you could, but you may need to make a custom camera system as well. Just try testing the game Gravity Controller (The game listed in the gravity controller article.)
I am now using a script from the Roblox Wiki to detect when players enter the “Gravity Zone”. The script doesn’t do anything, but I am going to add code to it later.
Thanks for all the help!
I am now using a script from the Roblox Wiki to detect when players enter the “Gravity Zone”. The script doesn’t do anything, but I am going to add code to it later.
Thanks for all the help!
This is the code I am currently using: local GravityWell = script.Parent.Parent local GravityWellRadius = GravityWell.Size.x/2 local Players = game:service(“Players”) function OnTouch(Part) local Character = Part.Parent if Character:IsA(“Model”) then local Humanoid = Character:WaitForChild(“Humanoid”) if Humanoid and Humanoid:IsA(“Humanoid”) then – The player is not affected by gravity. Humanoid.PlatformStand = true elseif Humanoid and Humanoid:IsA(“Humanoid”) then – The player is affected by gravity. Humanoid.PlatformStand = false end end end GravityWell.Touched:connect(OnTouch) I am trying to make it so that when a player is in the “Gravity Zone”, their Humanoid.PlatformStand = true. However, when I run this script, it does nothing. I don’t understand why it doesn’t work. Can anybody help?
Also, I want to make it so that the “Gravity” only effects players, and not objects. Can anybody help me with that?
Thanks for all the help!
I’m not quite sure what you mean by “I want to make it so that the ‘Gravity’ only effects players, and not objects”.
The script will only affect players (and not other objects) by default, because only Humanoids have a PlatformStand property, and only players have Humanoids.
One thing that you’re doing wrong is your line if Humanoid and Humanoid:IsA(“Humanoid”) then .
You’re checking here if Humanoid is a Humanoid, which it is (because you just checked that Line 15).