Whenever I use this code
game.ReplicatedStorage.StandStuff.TweenGui.OnClientEvent:Connect(function(gui,t) local guii = script.Parent.Template:Clone() guii.Name = gui guii.Visible = true guii.Text.Text = gui local twn = guii.TweenFrame:TweenSize(UDim2.new(0,0,1,0),Enum.EasingDirection.Out,Enum.EasingStyle. Quad,t) wait(t) guii:Destroy() end)
an error comes out and says
19:57:16.452 Can only tween objects in the workspace - Client - LocalScript:7
Even thought i used the tween event for gui frames
You forgot to add the parent of the clone So make sure to add this
guii.Parent = script.Parent
And it should look like this
game.ReplicatedStorage.StandStuff.TweenGui.OnClientEvent:Connect(function(gui,t) local guii = script.Parent.Template:Clone() guii.Parent = script.Parent guii.Name = gui guii.Visible = true guii.Text.Text = gui local twn = guii.TFrame:TweenSize( UDim2.new(0,0,1,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, t, false ) print(twn) wait(t) guii:Destroy() end)