Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Gui wont work in roblox player but will work in studio and i cant find out why?!

Asked by 6 years ago

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)


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

1 answer

Log in to vote
-1
Answered by 6 years ago

Weird, same happened to me and at least 20 guys more, it is all working correctly, what I will recommend.

For experimented developers: check if there's another script interfering with the work of this one What I did: submit everything on models to Roblox and create a new game adding everything again, I won't recommend to do that if your game was hard to do or is fully released, because it will delete all visits and and all that stuff (this solution worked to me)

Ad

Answer this question