Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

GUI Tweening, I need help?

Script:

--Variables
local Player = game.Players.LocalPlayer
Menu = Player.PlayerGui.Menu
ZC = Player.PlayerGui.ZanpakutoCustomizer

Menu.ZanpakutoCustomizerButton.MouseButton1Down:connect(function()
	--Page1Tweening
	Menu.ZanpakutoCustomizerButton:TweenPosition(UDim2.new(1, 0, 0, 0), "In", "Quad", 2, false)
	Menu.GameNameLabel:TweenPosition(UDim2.new(1, 0, 0, 0), "In", "Quad", 2, false)
	Menu.GameVersionLabel:TweenPosition(UDim2.new(0.25, 0, 1, 0), "Out", "Quad", 2, false)
	Menu.WelcomeToLabel:TweenPosition(UDim2.new(0.25, 0, 1, 0), "Out", "Quad", 2, false)
	
	--Page2Tweening
	ZC.ZCBackground:TweenPosition(UDim2.new(1, 0, 1, 0), "In", "Quad", 2, false)

end)

Output:

zars15's CFrame loaded 00:33:53.444 - ZanpakutoCustomizer is not a valid member of PlayerGui 00:33:53.445 - Script 'Players.Player1.PlayerGui.Menu.ZanpakutoCustomizerButton.Pa', Line 4 00:33:53.446 - Stack End 00:34:56.270 - Auto-Saving...

I've been trying to find out the problem for hours...

6 comments

0

It's a Valid member, but it's saying it's not...

0

The Output makes no sense...

0

IT WONT WORK FOR NO REASON!

0

SOMEONE ANSWER IM SPASSING!

0

Tweening only woks in local scripts now. Is it a local script?

0

Yes.

1 answer

✓ Accepted answer

First make sure you spelled everything correctly. Zanpakuto is a tricky word to spell

If that doesn't work, your issue is most likely that the script is running before the textbutton can load. To fix this, just use waitforchild.

ZC = Player.PlayerGui:WaitForChild("ZanpakutoCustomizer")

More info: http://wiki.roblox.com/index.php?title=WaitForChild

1 comment

0

I now see.

This discussion is preserved as it was. New answers, comments, and votes are closed.