I have a gui script but when i use it in studio is fine but in the player it wont work
local frame = script.Parent.Parent.Frame
local toggle = false
script.Parent.MouseButton1Click:connect(function()
if toggle == false then
frame:TweenPosition(UDim2.new(0.37, 0.04, 0.001, 0), "Out", "Back", 3)
script.Parent.Text = "<"
toggle = true
else
frame:TweenPosition(UDim2.new(-0.002, -200, 0.001, 3), "In", "Back", 3)
toggle = false
script.Parent.Text = "<"
end
end)

3 comments
I do not like using script.Parent method for GUI's. I always use PlayerGui and I never had problems with it.
Is this a local script or server script? Is Filtering Enabled on?
Go in game and check for errors in the developer console (Press F9). If there are any errors, edit them into your question.