The cube has a bodyforce inside of it that’s supposed to act as an anti-gravity effect for the part. However, when I touch the cube the anti-gravity effect works for a slight second then completely breaks and only pushes itself forward when the player gets close to it.
here is the code:
(this is a script inside of serverscriptservice)
for _, v in pairs(game.Workspace:GetChildren()) do
if v:IsA(“BasePart”) then
local bf = Instance.new(“BodyForce”)
bf.Parent = v
local downForce = - v:GetMass() * 196.2
local force = -downForce
bf.Force = Vector3.new(0,force,0)
end
end
and here is a video showing what it actually does:
Do you mean when you touch it, that it flies away, that’s because you are exerting more force than required to keep it still, therefore it is flying in an excess direction. To solve this you could either use CFrames, or just anchor it?
Oh no. I would like it to move just not stop and only move when i get close to it. On the video if you slow it down when i first touch cube two the antigravity effect works for a second then breaks.
This video is an example of whats supposed to happen when i move the cube. Just skip to when he starts messing with the ball part.