Tweening a part to do a small bounce

Hi,

I am trying to make a simple part do a quick bounce, my code below is working but the tween is very slow even with the time at 0.5, what am I doing wrong.

wait(5)

local TweenService = game:GetService("TweenService")

local tweenInfo = TweenInfo.new(
	0.5, -- Time
	Enum.EasingStyle.Bounce,
	Enum.EasingDirection.Out,
	0, 		-- Repeat -1 loop
	true, 	-- Reverse
	0  		-- Delay
)

local tween = TweenService:Create(
			script.Parent, 
			tweenInfo, { Position = Vector3.new(script.Parent.Position.X, script.Parent.Position.y - 0.5, script.Parent.Position.Z) })

tween:Play()

is this supposed to be here?‎ ‎

If you mean it is taking a while to happen, that is because of the 5 second wait at the start but if you mean the actual tween is going slow you could try to change the time to something extreme like 0.1 and see if there is a difference. If neither of these work could you show us with a video?

Yes, just so I can see the tween run, will remove when working.

can you show us a video where it is tweening ‘very slow’, i think you are firing the wrong tween

Hi, I have changed the time to 0.1 and faster but would like it to be faster but probably not possible.

I mean, you are only moving the thing by 0.5 studs in that 0.5 amount of time, which would only be 1 stud/time-unit (Which isn’t exactly fast). Probably just shorten the time even more.

Yes I would say just keep shortening the time till you get what you are looking for. Try 0.01 or even 0.001

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