My GUI tween keeps coming up with the error Unable to Cast Value to Function. Any help to fix this issue would be much appreciated.
Here is my code:
local creditsButton = script.Parent.Parent:WaitForChild("CreditsButton") local changelogButton = script.Parent.Parent:WaitForChild("ChangelogButton") local playButton = script.Parent.Parent:WaitForChild("PlayButton") local gameTitleLabel = script.Parent.Parent:WaitForChild("GameTitleLabel") local function hidePlayButtonTween() playButton:TweenPosition( UDim2.new(1, 0, 0.326, 0), --End Pos "Out", --Easing Direction "Sine", --Easing Style 1, --Time false, --Override Other Tweens false --Callback ) end creditsButton.MouseButton1Up:Connect(hidePlayButtonTween) creditsButton.TouchTap:Connect(hidePlayButtonTween)
The last parameter for TweenPosition is looking for a function, you gave it a boolean value. nil
would be correct, I believe. nil tells the TweenPosition method that there is no callback function