|
| 23 Dec 2015 04:09 PM |
GUI works while in test mode, but if somebody actually plays the GUI fails to work.
local Button = script.Parent local OptionsPane = Button.Parent.Parent.OptionsPane local Player = game.Players.LocalPlayer mouse = Player:GetMouse() Enter = false
Button.MouseEnter:connect(function() Enter = true MouseText = Button.Parent.MouseOverText:clone() MouseText.Parent = Button.Parent.Parent MouseText.Visible = true while Enter == true do MouseText.Position = UDim2.new(0, mouse.X-5, 0, mouse.Y-5) wait(0.1) end end)
Button.MouseLeave:connect(function() Enter = false for _, child in pairs(Button.Parent.Parent:GetChildren()) do if child.className == "TextLabel" then child:Destroy() wait() end wait() end wait() end)
Button.MouseButton1Down:connect(function() if OptionsPane.Visible == true then OptionsPane.Visible = false wait(0.1) elseif OptionsPane.Visible == false then OptionsPane.Visible = true else return end end) |
|
|
| Report Abuse |
|
|
| 23 Dec 2015 04:11 PM |
| Put a wait at the start. This is due to the script not loading fast enough causing your variables not to load. |
|
|
| Report Abuse |
|