Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

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)    
0
Line 3 Error: There is a misplaced period right before ":TweenPosition" McRocketNuggets 65 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago
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)    
Ad
Log in to vote
0
Answered by 5 years ago

It don´t work when I removed it.

Answer this question