I have a gravity controller script which pretty much allows the player to walk on the surface of any block with a specific name, and the world gravity or world forces do not impact the player so they will fall down and so on. I have set the world gravity to 0 and used scripts that apply a velocity to all objects, so they will fall in any direction I want. The problem is, it completely doesn’t impact the player’s avatar due to said gravity script.
I have tried many things but could not fix it anyhow, like attaching a block to the player so it will pull the player down, it seemingly stops working with the script or the block is not capable of pulling the player at all and glitches out, I also tried morphs and using items but none of them are impacted by it. I did check and the player avatar is also impacted by that script when the gravity controller is disabled.
Here is the script that applies forces to objects:
script.Parent.Touched:Connect(function(hit)
float = Instance.new("BodyVelocity",hit)
float.MaxForce = Vector3.new(0,hit:GetMass()*-200,0)
float.Velocity = Vector3.new(0,10,0)
float.Name = "WaterFloat"
if hit.Velocity.Magnitude >= 30 then
splash = script.Parent.Splash:Clone()
splash.Name = "Splash"
splash.Parent = hit
splash.Enabled = true
splash.AutomaticToggle.Disabled = false
if hit.Velocity.Magnitude >= 220 then
hit:BreakJoints()
end
end
end)
script.Parent.TouchEnded:Connect(function(hit)
hit.WaterFloat:Destroy()
end)
I am thankful for all and any help.