So, the shop ring is supposed to open a shop UI whenever a player touches the ring, and you could close the shop UI by using a button inside of the shop UI, but for me, the whole process only works once, and it never works again. Plus, there is no error in the output, so I have no idea what is wrong
Normal script inside of the shop ring:
game.Players.PlayerAdded:Connect(function(player)
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
player.PlayerGui.ScreenGui.Frame:TweenPosition(UDim2.new(0.338, 0,0.181, 0),"Out","Quint",.5,true)
end
end)
end)
Local script inside the shop UI close button:
local frame = script.Parent.Parent.Parent
script.Parent.MouseButton1Click:Connect(function()
frame:TweenPosition(UDim2.new(0.338, 0,1.15, 0),"Out","Quint",.5,true)
end)
