I am trying to make a Tweened GUI that will, instead of on click of a button, a part that you touch. I've tried a lot of different scripts, but none seem to work.
The code that I usually use for when I click a button to Tween a Gui is this:
local frame = game.StarterGui.ScreenGui local toggle = false
script.Parent.**MouseButton1Click**:connect(function()
if toggle == false then
frame:TweeningPosition(UDIM2.new(coords), 'Out / In', 'Easing Style', 1)
toggle = true
else
frame:TweeningPosition(UDIM2.new(coords), 'Out / In', 'Easing Style', 1)
toggle = false
end
end)
And yes I have tried changing the bold part to Touched.*
Anyways to help?

2 comments
why are you using cords twice?
Use a RemoteEvent.