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

Beginner Scripter: (TWEENING) I need help with this. May you please help me?

Asked by 4 years ago

Okay so, I need help with this script. I'm trying to figure out whether there's a problem my Tween, I'm very confused. Here, take a look at it:

local playbutton = script.Parent
function OnButtonClick()
    playbutton.MouseButton1Click:Connect(OnButtonClick)
    playbutton:TweenPosition(UDim2(5,0,0,0) "InOut", "Cubic", 1)
end

I don't know what I did wrong. Thank you for your time.

0
Line 4: playbutton:TweenPosition(UDim2.new(5,0,0,0),"InOut","Cubic",1) - You forgot the new in the UDim2. UDim2.new(). killerbrenden 1537 — 4y
0
And take line 3 out of the function, and put it after the end, so it's under everything. killerbrenden 1537 — 4y
0
Okay, thanks. PumpyTooClouted 4 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
local playbutton = script.Parent

function OnButtonClick()
    playbutton:TweenPosition(UDim2.new(5,0,0,0) "InOut", "Cubic", 1)
end

playbutton.MouseButton1Click:Connect(OnButtonClick)

Line 4: playbutton:TweenPosition(UDim2.new(5,0,0,0),"InOut","Cubic",1) - You forgot the new in the UDim2. UDim2.new().

Line 3: Take it out of the function, and put it after the end, so it's under everything.


Hope this helped! If this worked for you, let me know by selecting this as the answer!

Ad

Answer this question