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

I have a Script for Gui Tweening but why it don´t work ?

Hi, I want to ask somebody why my script doesn´t work.

script.Parent.MouseButton1Click:Connect(function()
	if script.Parent.Parent.Position == UDim2.new(0,0,0,0) then
	script.Parent.Parent.:TweenPosition(UDim2.new(0,0,1,0)), "Out", "Quad", 2)
	elseif script.Parent.Parent.Position == UDim2.new(0,0,1,0)) then
		game.StarterGui.MainMenue.ChangelogMenue.GameFrame:TweenPosition(UDim2.new(0,0,0,0), "In", "Quad", 2)
	end
end)	

1 comment

0

Line 3 Error: There is a misplaced period right before ":TweenPosition"

2 answers

script.Parent.MouseButton1Click:Connect(function()
    if script.Parent.Parent.Position == UDim2.new(0,0,0,0) then
    script.Parent.Parent:TweenPosition(UDim2.new(0,0,1,0)), "Out", "Quad", 2) --you had a period next to your colon lol
    elseif script.Parent.Parent.Position == UDim2.new(0,0,1,0)) then
        game.StarterGui.MainMenue.ChangelogMenue.GameFrame:TweenPosition(UDim2.new(0,0,0,0), "In", "Quad", 2)
    end
end)    

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