So basically what i want to achieve is that i want the “Time” UI to tween once the event fires, with the tween duration being the number received with the event.
-- Server Script
local repstorage = game:GetService("ReplicatedStorage")
local tweenevent = repstorage:WaitForChild("CountdownTween")
workspace.CoreFolder.Countdown.CountTo0.Enabled = true
local registeredtime = 240
tweenevent:FireAllClients(registeredtime)
-- Client Script
local repstorage = game:GetService("ReplicatedStorage")
local tweenevent = repstorage:WaitForChild("CountdownTween")
local ts = game:GetService("TweenService")
local function tweenEvent(registeredtime)
local tinfo = TweenInfo.new(registeredtime, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
script.Parent.Time.Position = UDim2.new(0, 0, 0, 0)
local tween = ts:Create(script.Parent.Time, tinfo, {Position = UDim2.new(-1, 0, 0, 0)})
tween:Play()
end
tweenevent.OnClientEvent:Connect(tweenEvent)
Do note that the problem here is only the tweening part, everything else works as intended.
local part = script.Parent
local TweenServer = game:GetService("TweenService")
local TweenLop = TweenInfo.new(3)
local Target = {part.TweenSize == Vector3.new(30,30,20)
}
I thing its like this {Dont try this script i thing its not work}
local whateveryourframeoruielement = script.Parent.Frame -- choose ur different path
local function tweenEvent()
whateveryourframeoruielement:TweenPosition(UDim2.new("INSERT POSITION"), "InsertEasingDirection", "InsertEasingStyle", "Time")
whateveryourframeoruielement:TweenSize(UDim2.new("WHATEVER UR SIZE IS"), "InsertEasingDirection", "InsertEasingStyle", "Time")
whateveryourframeoruielement:TweenSizeAndPosition(UDim2.new("FIRSTTHESIZE"), UDim2.new("POSITION"), "InsertEasingDirection", "InsertEasingStyle", "Time")
end
-- do note that EasingDirection and Style must be in quotaion marks
also dont mind the bad grammar, i tried to do it fast