Hi. I am trying to make a sphere roll towards the position of your mouse but never stop.
I only want to use BodyAngularVelocity to move the sphere to make it more realistic.
Any help is appreciated!
Hi. I am trying to make a sphere roll towards the position of your mouse but never stop.
I only want to use BodyAngularVelocity to move the sphere to make it more realistic.
Any help is appreciated!
I am not certain if I can help you or not. I need to ask you further info. I have already made a game in which spheres or ball parts are present. I can grab a gun that I made and shoot at the ball. If the bullet hits the ball, the sphere/ball rolls and moves.
Is this what you need ? Or are you talking about something else entirely ?
No :D, I am talking about a game where you control a character that is a ball.
I dont want the character to have humanoid
I don’t want to use BodyVelocity or BodyPosition. I only want to use BodyAngularVelocity
I want to make the ball roll in a direction where the mouse is pointing
You have to use a BodyVelocity
in order to maintain the velocity where you want the Sphere to Roll in relevance to the Mouse’s Position, unless if you want to view it from a different perspective (ViewportFrame, or just anchored with rotating the CFrames
every now and then via a BodyAngularVelocity
)
A BodyVelocity
only manages the position, while a BodyAngularVelocity
only manages the orientation/rotation
I know but I want to make the sphere roll and move using friction
If there is no other way I will use BodyVelocity, but i want to avoid that.
Then you’d need to mess around with the CustomPhysicalProperties
of the part, setting its friction to where you want it to slide, then potentially looping through to get the Velocity
property of the part in a LocalScript
getting the Mouse & Mouse’s Position in order to move it that way
From your OP, again: There’s no velocity being assigned to the sphere itself if you’re only just using a BodyAngularVelocity
, it’s only changing the rotation so it’s not possible to do that
You can use this:
event.OnServerEvent:Connect(function(player, mouseCFrame)
local TS = game:GetService("TweenService")
local part = workspace.Part
local tween = TS:Create(part,TweenInfo.new(--time,--style,--direction,--repeat,--reverse,--delay, {CFrame = mouseCFrame})
while wait() do
tween:Play()
tween.Completed:Wait()
end
For the fire server do this
event:FireServer(mouse.Hit)
Tween Service will stop the sphere when it reaches the position + I want to make the sphere roll, not just fly there.
It is in a loop when it stops it plays again lol XD