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
 

will not turn visible...

Previous Thread :: Next Thread 
ehern11 is not online. ehern11
Joined: 23 Apr 2011
Total Posts: 1541
29 May 2015 09:39 PM
this is actually extremely annoying since it's pretty simple but doesn't want to work...
here's the code;
local player = script.Parent.Parent.Parent.Parent

while wait() do
if player.Name == "Player1" then
script.Parent.MFrame.Visible = true
end
end

does anyone see anything wrong..?
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
29 May 2015 09:40 PM
Tell my what output says:

while wait() do
if player.Name == "Player1" then
script.Parent.MFrame.Visible = true
else
print("You messed up.")
end
end
Report Abuse
crazyman32 is online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
29 May 2015 09:42 PM
First of all, the player's name will never change, thus using an infinite loop to check it continuously is kinda pointless.

Secondly, if you're doing GUI stuff, you probably should use a LocalScript. And in that case, player = game.Players.LocalPlayer

Thirdly, are you getting any errors in the output?
Report Abuse
ehern11 is not online. ehern11
Joined: 23 Apr 2011
Total Posts: 1541
29 May 2015 09:42 PM
"You messed up."
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
29 May 2015 09:42 PM
Are you sure the player is named Player1? I have instances where it was just Player for some reason.
Report Abuse
ehern11 is not online. ehern11
Joined: 23 Apr 2011
Total Posts: 1541
29 May 2015 09:43 PM
It was Player but then I noticed it changed into Player1.
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
29 May 2015 09:44 PM
Oh wait lol I totally messed up fixing your script, try this instead:


if player.Name == "Player1" then
script.Parent.MFrame.Visible = true
else
print("You didn't put in the right name.")
end
end
Report Abuse
ehern11 is not online. ehern11
Joined: 23 Apr 2011
Total Posts: 1541
29 May 2015 09:46 PM
I actually did put the right name. I just checked.
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
29 May 2015 09:51 PM
Anyway, are there any errors when you run your script?
Report Abuse
ehern11 is not online. ehern11
Joined: 23 Apr 2011
Total Posts: 1541
29 May 2015 09:52 PM
actually putting it in a local script helped fix my problem. thank you guys.
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