I’ve recently been struggling to figure out a way to show a tween that is shown for all clients, not just one.
I’ve looked at things such as TweenService V2, but that doesn’t have a proper Complete function which is what I like about the normal TweenService.
It’s just rather an annoyance right now, the following script works well client side:
rEvents.GenCountdown.OnClientEvent:Connect(function()
local TS = game:GetService("TweenService")
local gui = MainUI.Generator.Gen1Bar
local TI = TweenInfo.new(10,Enum.EasingStyle.Linear, Enum.EasingDirection.InOut,0,false,0)
local createAnim = TS:Create(gui, TI, {Size = Goal})
while true do
wait(0.2)
if (humanoid.Position - Gen2.Position).Magnitude < checkRange and eKeyDown() then
createAnim:Play()
else
createAnim:Pause()
end
end
end)
However, it’s just the part of where I’m trying to replicate this for all clients. Has anyone done anything similar with tweens?
I had this running, but it wasn’t actually updating anything, if I was to put the FireServer in the if statement for if a player was to hold the E key down, it wouldn’t be updating the Tween
Yes, I’m using UserInputService for this so it can see if the player is holding E.
Basically player holds the key E, is within the radius, and the tween starts to move. If the player was to let go of E, and leave the distance then the tween will pause.