#Sittable bouncing ball
1 messages · Page 1 of 1 (latest)
looks like just a a mesh that gets squized (change Y size) and perhaps a tiny bit of upwards force
hm let me try
um it's like this
Are you actually change the mesh's size or de model's size?
i did it like this: `local TweenService = game:GetService("TweenService")
local ball = script.Parent
local seat = ball:FindFirstChildWhichIsA("Seat")
local originalSize = Vector3.new(4, 4, 4)
local squishSize = Vector3.new(4.4, 3.4, 4.4)
local bounceTween = nil
-- Tween info
local tweenInfo = TweenInfo.new(
0.3,
Enum.EasingStyle.Sine,
Enum.EasingDirection.InOut,
-1, -- loop forever
true -- reverse
)
-- Create the tween function
local function startBounce()
local goal = { Size = squishSize }
bounceTween = TweenService:Create(ball, tweenInfo, goal)
bounceTween:Play()
end
local function stopBounce()
if bounceTween then
bounceTween:Cancel()
ball.Size = originalSize
end
end
-- Detect when player sits
seat:GetPropertyChangedSignal("Occupant"):Connect(function()
if seat.Occupant then
startBounce()
else
stopBounce()
end
end)
`
is the ball a model or a mesh?
I've never tried to work on something like this with parts to be frank
let me quickly run a very quick test
Nope, I would just use a mesh
Wanted to check if roblox had some property for it. But for some reason their balls suck
in case you don't have blender:
Just an isosphere and some subd. Should be smooth enough
In case it isn't, then I can send you a smoother one (the smoother it is, the laggier it is, of course)
idc about lag but 1 sec let me understand things rn
Roblox handles "balls" weirdly. So it always looks at the "largest shape inside the box", without causing deformation
While a mesh, there it just allows you to deform it as you wish
model u sent me, is it mesh?
Yes, .objs are almost always meshes
Example of what I meant: With a mesh I can do this
it looks so good
With a ball, it would just try to fit the same "truck", just scaled down to be the largest it can be inside that shape
uhm like i can't make that bounce
it looked so easy at first 😭
Depends, if you move it up a tad with some force then it should be fine
But you could just anchor it
Do remember that it then will be floating
so move it down half the size change in the y position
(at the same speed as the size change)
Have you added the force that I told you to add?
Oh- I didn’t
i just dont understand like i even asked ChatGPT, but it still doesn't work.
Use a mesh and bone to animate it squishing
in Blender?
idk, ask chatgpt