I'm having trouble tweening a GUI when a player's character touches a part. It seems that it should be fairly simple, but it has actually proven to be quite challenging. Here is the code I currently have in the part I want the character to touch:
local frame = game.StarterGui:WaitForChild("TeleportOptions").Frame
function onTouch()
frame:TweenPosition(UDim2.new(0.11, 322, -0.2, 223), "Out", "Quint", 0.9, false)
-- Test print statement to indicate that the block is being touched
print("Part has been touched")
end
script.Parent.Touched:Connect(onTouch)
There are no errors showing in the output and the test print statement seems to be working. I'm not sure if it isn't working due to way the frame variable is being called or if the frame is being tweened too many times while the player touches the part multiple times.
I may be taking the wrong approach to the task, so if there is a better way of achieving the same goal, please let me know.

2 comments
you should access the player's playergui and find the TeleportOptions frame there rather than accessing the startergui's TeleportOptions frame
im going to make it work then ill give you hte code