Hey, I am having a bug where my UI does appear the first time, then after I close it and reposition it it doesnt work anymore. I debugged it and frame still prints, the tweening just isnt working the second time.
Code for UI to appear and position (server script) :
local players = game:GetService("Players") script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then print("hit") local player = players:GetPlayerFromCharacter(hit.Parent) local frame = player.PlayerGui.MainGui.MainFrame.MatchMakingFrame frame.Visible = true frame:TweenPosition(UDim2.new(0.5,0,0.5,0),Enum.EasingDirection.Out,Enum.EasingStyle.Back,0.5) end end)
Code to close and reposition UI (local script) :
script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.Searching.Value = false script.Parent.Parent.Parent:TweenPosition(UDim2.new(0.5,0,-0.5,0),Enum.EasingDirection.In,Enum.EasingStyle.Back,0.5) wait(0.6) script.Parent.Parent.Parent.Visible = false end)
Let me know.