local TweenSettings = TweenInfo.new(0.05)
shootEvent.OnServerEvent:Connect(function(plr,v) -- Needs cooldown or breaks add debounce to animations
local ammo = 0 -- Assign ammo via server
print("ammo is "..ammo)
print(tick())
for _,Slider in v:GetChildren() do
local TriggerTween = TweenService:Create(v.Handle.Trigger,TweenSettings,{["C0"] = v.Handle.Trigger.C0 * CFrame.new(math.rad(0.99),0,0)}) -- Trigger back
local TriggerTween2 = TweenService:Create(v.Handle.Trigger,TweenSettings,{["C0"] = v.Handle.Trigger.C0 * CFrame.new(0,0,0)})
local SliderA = Slider.Parent.Handle.Slider -- References slider
if Slider.Name == "Slider" then -- Move to bindable event????
local tween = TweenService:Create(SliderA,TweenSettings, {["C0"] = SliderA.C0 * CFrame.new(-0.5,0,0)})
local tween2 = TweenService:Create(SliderA,TweenSettings, {["C0"] = SliderA.C0 * CFrame.new(0,0,0)})
tween:Play()
TriggerTween:Play()
TriggerTween.Completed:Connect(function() -- After trigger pulls bck it goes back to orig pos
wait(0.1)
TriggerTween2:Play()
end)
tween.Completed:Connect(function() -- After cockback it goes back to orig pos
wait(0.05)
tween2:Play()
end)
end
end
end)
#Tween Animation breaks tool
13 messages · Page 1 of 1 (latest)
u could add a debounce to only the animation?
Is this normal if there’s no debounce? Like, if a tween is spammed it’ll break the object?
I’m just trying to make sure I have no weld issues
im not sure idrk that much of animation but that was just a suggestion
maybe the physics is broken??
I'll investigate further, if the debounce doesn't work im going to be seriously frustrated.
ok
@solemn flax alternative solution found, having two sliders and changing the transparency
@keen apex