generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: GUI Issues

Previous Thread :: Next Thread 
Treestomped is not online. Treestomped
Joined: 22 Dec 2015
Total Posts: 1
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
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image