so it says Players.TypicalVictorlks.PlayerGui.Menu.MenuMain:14: attempt to call a TweenInfo value. So um what does that mean and what do i need to fix to my script?
wait(5) --services local Tween = game:GetService("TweenService") --Variables local SideBar = script.Parent:WaitForChild("SideBar") local PlayBtn = SideBar:WaitForChild("Play") local CreditsBtn = SideBar:WaitForChild("Credits") local Title = SideBar:WaitForChild("Title") Tween:Create( SideBar, TweenInfo.new(0.4,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0) {Position = UDim2.new(0,0,0,0)} ):Play()
also i asked this in my recent post but no one has responded lol
Are you sure that's what the error is? There is an issue with this but it would be saying a different error. There is not a comma between the TweenInfo argument and the table with the tween goals, which I assume is a typo.
Tween:Create( SideBar, TweenInfo.new(0.4,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0), {Position = UDim2.new(0,0,0,0)} ):Play()
However, to answer your question about "attempt to call x value", it means that you tried to use something that is not a function, like a function. So to get this error with a TweenInfo object, you would do this:
TweenInfo.new(0.4,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0)() -- this looks weird but notice the two parentheses at the end, similar to how you would call a function like "myFunction()"
or
local tweenInfo = TweenInfo.new(0.4,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0), tweenInfo()
wait so its supposed to be like this right? This is hurting my brain cells
01 wait(5) 02 03 --services 04 local Tween = game:GetService("TweenService") 05 06 --Variables 07 local SideBar = script.Parent:WaitForChild("SideBar") 08 local PlayBtn = SideBar:WaitForChild("Play") 09 local CreditsBtn = SideBar:WaitForChild("Credits") 10 local Title = SideBar:WaitForChild("Title") 11 12 Tween:Create( 13 SideBar, 14 local tweenInfo = TweenInfo.new(0.4,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0), tweenInfo() 15 {Position = UDim2.new(0,0,0,0)} 16 ):Play()