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

Why does this Tween Position script not work I have tried multiple things?

script.Parent.MouseButton1Down:connect(function()
	script.Parent.Parent:TweenPosition(UDim2.new(-0.9,0,0.377,0), 'Out', 'Sine', .5)
end)

2 answers

Just tryin

--USE IN LOCALSCRIPT THEN PUT UNDER THE PART

local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()

Mouse.Button1Down:connect(function()
   script.Parent.Parent:TweenPosition(UDim2.new(-0.9,0,0.377,0), 'Out', 'Sine', .5)
end)

2 comments

0

That did't work

0

How could that possibly make a difference? the only think is you added two variables but the variables dont go to anything

Okay so I found out myself and I got it

--USE IN LOCALSCRIPT THEN PUT UNDER THE PART

script.Parent.MouseButton1Down:connect(function()
   script.Parent.Parent:TweenPosition(UDim2.new(-0.9,0,0.377,0), 'Out', 'Sine', .5)
end)

1 comment

0

What changed?

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