Make a ball bounce without making it rotate whenever bounce off something

i want to make a ball bounce or a part bounce similar to this:
https://gyazo.com/a03f1611e501b3be1012e8ec94e1aac7

rn im looping the orientation of the carrot in to 0,0,0 so it wont rotate when bounce but this happen;
https://gyazo.com/a803bb7efb6c2c7691e2ca3aae5f5d3c
the carrot keep slide away

but right now i really need an anchored bounce ball kind of script
can anyone help me? thanks.

Copy/Paste your script here so we can figure out how you are making this happen.

Remember to put 3 backticks (```) before and after the script so it formats correctly in your post.

here u go simple

while task.wait() do
script.Parent.Orientation = Vector3.new(0,0,0)
end

for the bounce thing I use the custom physic

Yes, that script keeps it upright, but it doesn’t keep it bouncing in the same Position. I’m guessing that’s what you want by your “anchored bounce” comment.

What’s your “custom physic” that makes it bounce? That’s what is allowing them to move from their original location.

If you want the bananas to be actually Anchored you could use a Lerp in your script to just move it up and down.

this is the custom physic
image

and by anchored bounce thing i meant i want the carrot to bounce even with anchor on
raycast reflect or bezier curve may be good at this stuff but i dont really know how to use them

So a scripted Anchored, bouncing item.
Tween the CFrame of the item, and use EasingStyle | Roblox Creator Documentation to make the “bounce” realistic, sharp at the bottom, but gradually slowing down as it moves up and accelerating when it falls down again.

I get what you’re saying but this is what I want
https://gyazo.com/a803bb7efb6c2c7691e2ca3aae5f5d3c

not the item drop thing

This is a script i made for myself that makes an anchored part bounce:

local part = script.Parent

part.Velocity = Vector3.new(0, 20, 0)

while true do
	wait(0.1)
	
	part.Velocity = part.Velocity - Vector3.new(0, 20, 0) * 0.1
	
	local touch = part:FindFirstChild("Touched")
	if touch then
		part.Velocity = Vector3.new(0, 20, 0)
		touch:remove()
	end
end

You can paste it into localscript and parent it to the correspondent part

cool but a part need to be unanchor for velocity to work tho

I know this uses a deprecated object and probably isn’t the best method, but have you tried using a BodyGyro? Just insert a blank BodyGyro like so:

local gyro = Instance.new("BodyGyro")
gyro.MaxTorque = Vector3.one * math.huge
gyro.P = 5000
gyro.D = 250
gyro.CFrame = CFrame.Angles(0,0,0)

gyro.Parent = carrotPart -- Or whatever references the carrot model

You can use Aligned Orientation or Body Gyro but it’s deprecated

i figured it out myself
using raycast and velocity thanks to everybody here who tried to help me
https://gyazo.com/3d7907ad89a6c5511e3fa40602e3c1d4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.