when a button (in this case the X button) is clicked then the ui smoothly tweens down and then becomes invisible once done, yet it gives me an error in the output saying " 23:06:37.430 Unable to cast value to function - Client - LocalScript:4", is this cause of roblox being down or my bad scripting skills?
Its nothing to with scripting skills just a common mistake we all make. Just remember next time if you going to put words in a string use “” or ‘’, not “”.
the popup is a frame that controls the tweening, the textbutton inside credits is the X button, the credits has a script which i will tell u in a second, the credits frame is the actual thing we tween
the script for the credits button:
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.popup.Visible = true
script.Parent.Parent.popup:TweenPosition(UDim2.new(0, 0, 0.074, 0), “In”, “Quart”, 0.7, true)
task.wait(0.7)
script.Parent.Visible = false
script.Parent.Parent.pla.Visible = false
end)
i had the same issue today while tweening but then it just got fixed when i retyped it (but without variables), i do not know why that fixed it, and thats also the reason the scripts look unorganized with all the .parents
ok good to hear, but next time if you going to post a script on the dev forum and you want people to help you fix it, put ``` before the code and the same after it, makes it easier to read.