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: Issue that I can't seem to find

Previous Thread :: Next Thread 
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
28 Oct 2015 03:40 PM
Open = false
Moving = false
plr = game.Players.LocalPlayer
allowed = require(game.ReplicatedStorage.AllowedList)

function chkAuthorized(p)
for i = 1,#allowed do
print(allowed[i])
if p.Name:lower() == allowed[i]:lower() then
return true
end
end
end

if chkAuthorized(plr) then
script.Parent.Visible = true
end


script.Parent.MouseButton1Down:connect(function()
if not Open and not Moving then
print('7')
script.Parent.Parent.adminPanel.Visible = true
print('8')
Moving = true
print('9')
script.Parent.Parent.adminPanel:TweenPosition(UDim2.new(0.3,0,0.25,0), "Out", "Quad", 3)
print('10')
script.Parent.TextLabel.BackgroundColor3 = Color3.new(55/255,199/255,190/255)
print('11')
Moving = false
print('12')
Open = true
print('13')
end
end)

script.Parent.MouseButton1Down:connect(function()
if Open and not Moving then
print('1')
Moving = true
print('2')
script.Parent.Parent.adminPanel:TweenPosition(UDim2.new(-0.5,0,0.25,0), "Out", "Quad", 3)
print('3')
script.Parent.TextLabel.BackgroundColor3 = Color3.new(115/255,116/255,36/255)
print('4')
Open = false
print('5')
Moving = false
print('6')
end
end)

It'll open once and it'll close. After you close it once, it just breaks. It prints everything but I can't see the GUI and it doesn't change position (I check it in build mode). Any solutions?
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
28 Oct 2015 03:44 PM
Do you get any errors when it breaks? Press f9 while in game to check the Developer's console. It will show client-side output and server-side output. If you are doing this with a local script (as you should be) then look in the client output.
Report Abuse
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
28 Oct 2015 03:47 PM
No errors at all but it does print everything (the numbers) in the first MouseButton1Down event. And yes, it's a local script.

I'm assuming that it's a logic error but I don't see where I could've made a mistake in the code.
Report Abuse
JustGoAwayNowPlease is not online. JustGoAwayNowPlease
Joined: 27 Oct 2015
Total Posts: 50
28 Oct 2015 03:53 PM
Try this:
script.Parent.MouseButton1Down:connect(function()
if (Open and not(Moving)) then
Moving = true
script.Parent.Parent.adminPanel.Visible = true
script.Parent.Parent.adminPanel:TweenPosition(UDim2.new(0.3,0,0.25,0), "Out", "Quad", 3)
script.Parent.TextLabel.BackgroundColor3 = Color3.new(55/255,199/255,190/255)
Moving = false
Open = true
elseif not(Open and Moving) then
Moving = true
script.Parent.Parent.adminPanel:TweenPosition(UDim2.new(-0.5,0,0.25,0), "Out", "Quad", 3)
script.Parent.TextLabel.BackgroundColor3 = Color3.new(115/255,116/255,36/255)
Moving = false
Open = false
end
end);

Tell me if it doesn't work as I've not tested it.
Report Abuse
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
28 Oct 2015 03:58 PM
Nevermind, turns out that I just had to add a wait(3) after the TweenPosition. Thanks anyway though.
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