So basically what i am trying to do is make it so that when you click on the start button when you join the game a black square will grow to cover the screen then shrink back down. Problem is that i can't figure out how to do said thing
local GUI = script.Parent
local Frame = script.Parent.Parent
local tran = script.Parent.Parent.Parent.Transition.Frame
function onClick()
tran:TweenSize(100, 0,100, 0), "out", 1)
Frame.Enabled = false
wait(1.5)
tran:TweenSize(0, 0,0, 0), "out"1)
end
GUI.MouseButton1Down:Connect(onClick)
thats all i have gotten

8 comments
It worked but now it's giving me an error saying that my transition does not exist. Anyways thank you so much
You're weclome. What was about the transition not existing? Can you provide us part of your code that was causing the problem?
I Fixed that but now i got "Unable to cast string to token"
Oh yea on line 6 which is "tran:TweenSize(UDim2.new(100, 0,100, 0), "out", 1)"
I recommend setting the parameter for easingDirection as an Enum (Enum.EasingDirection.Out), and that ROBLOX Studio thinks you put a number in the esaingStyle parameter. It should be UDim2.new(1, 0, 1, 0) , Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 1).
By the way, UDim2.new(100, 0, 100, 0) is incorrect if you want your object to be only 100x100 pixels because it's in the Scale parameters. If you want it to consume 1/4 of the screen, do UDim2.new(0.5,0,0.5,0), or if you want to fill... UDim2.new(1,0,1,0) or 200 pixels wide, 300 pixles high... UDim2.new(0, 200, 0, 300).
YES THANK YOU! Now I just need to edit the frame and i'm done :D
You're welcome. I'm glad I helped you. :)