I used vector3 and tweenservice to make the object shake slightly when clicked. However, when I run it, it fluctuates greatly no matter how much I change the value of vector3. I would appreciate it if you could tell me how to fix it.
Please let me know if there is a similar topic, but I couldn’t find it.
local Item = script.Parent.Item
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
0.1,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
true,
0
)
local Tween
script.Parent.ClickDetector.MouseClick:Connect(function(plr)
Tween = TweenService:Create(Item,tweenInfo,{Position = Vector3.new(10,0,0)})
Tween:Play()
end)