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 » Scripting Helpers
Home Search
 

Re: Hwow would I get something such as this to work?

Previous Thread :: Next Thread 
Dimethylmercury is not online. Dimethylmercury
Joined: 30 Apr 2013
Total Posts: 9701
21 Sep 2013 06:47 PM
game.Players.PlayerAdded:connect(onPlayerRespawned)
if newPlayer.Name == "Player1" then
b = script.Parent.ScreenGui:clone()
b.Parent = newPlayer.StarterGui
b.Disabled = false
end
game.Players.PlayerAdded:connect(onPlayerRespawned)

Į ām Díttø Fręèmàñ.
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
21 Sep 2013 06:51 PM
admins = {"Soquick"}
game.Players.PlayerAdded:connect(function(newPlayer)
for i = 1, #admins do
if newPlayer.Name:lower() == admins[i]:lower() then
b = script.Parent.ScreenGui:clone()
b.Parent = newPlayer.PlayerGui
b.Disabled = false
end
end)
Report Abuse
Dimethylmercury is not online. Dimethylmercury
Joined: 30 Apr 2013
Total Posts: 9701
21 Sep 2013 06:58 PM
Using that seems like a much better alternative, but it does not work.
Could that be because the "PlayerGui" is unable to be edited?

Į ām Díttø Fręèmàñ.
Report Abuse
Dimethylmercury is not online. Dimethylmercury
Joined: 30 Apr 2013
Total Posts: 9701
21 Sep 2013 07:16 PM
bump
Report Abuse
darthpyro is not online. darthpyro
Joined: 18 Aug 2009
Total Posts: 3569
21 Sep 2013 07:20 PM
admins = {"Soquick"}
game.Players.PlayerAdded:connect(function(newPlayer)
for i = 1, #admins do
if newPlayer.Name:lower() == admins[i]:lower() then
b = script.Parent.ScreenGui:clone()
b.Parent = newPlayer.PlayerGui
b.Disabled = false
end
end)

-- Assuming script.Parent.ScreenGui is a ScreenGui in nature, and not a script, is it possible to "disable" it? Or do you mean to select the script inside of ScreenGui and disable it?

Also, you might try waiting until newPlayer.PlayerGui isn't nil, in case this is firing before it's been created.
Report Abuse
Melki3k10 is not online. Melki3k10
Joined: 08 Nov 2010
Total Posts: 469
21 Sep 2013 07:24 PM
It prints no errors and I meant the script that was inside the gui.
Report Abuse
Melki3k10 is not online. Melki3k10
Joined: 08 Nov 2010
Total Posts: 469
21 Sep 2013 07:25 PM
Also, I am Dimethylmercury.
Report Abuse
darthpyro is not online. darthpyro
Joined: 18 Aug 2009
Total Posts: 3569
21 Sep 2013 07:25 PM
So change it to target the script that's inside of the gui, add a wait() and come back to me?
Report Abuse
Melki3k10 is not online. Melki3k10
Joined: 08 Nov 2010
Total Posts: 469
21 Sep 2013 07:29 PM
I have added a wait and made it target the script within the gui.

admins = {"Player1"}
game.Players.PlayerAdded:connect(function(newPlayer)
wait(3)
for i = 1, #admins do
if newPlayer.Name:lower() == admins[i]:lower() then
b = script.Parent.ScreenGui:clone()
b.Parent = newPlayer.PlayerGui
b.LocalScript.Disabled = false
end
end
end)
Report Abuse
darthpyro is not online. darthpyro
Joined: 18 Aug 2009
Total Posts: 3569
21 Sep 2013 07:31 PM
Don't use a normal wait when you're waiting for a certain thing.


admins = {"Player1"}
game.Players.PlayerAdded:connect(function(newPlayer)
repeat wait() until newPlayer.PlayerGui end
for i = 1, #admins do
if newPlayer.Name:lower() == admins[i]:lower() then
b = script.Parent.ScreenGui:clone()
b.Parent = newPlayer.PlayerGui
b.LocalScript.Disabled = false
end
end
end)



... so run this and tell me if it works?
Report Abuse
Melki3k10 is not online. Melki3k10
Joined: 08 Nov 2010
Total Posts: 469
21 Sep 2013 07:33 PM
Running that, nothing apparent seemed to change.
It still seems that PlayerGui might be a locked property of whatever it would be called of the Player
Report Abuse
Melki3k10 is not online. Melki3k10
Joined: 08 Nov 2010
Total Posts: 469
21 Sep 2013 07:55 PM
I have been looking at some free model scripts, but none have helped.
Report Abuse
robotmega is not online. robotmega
Joined: 16 May 2009
Total Posts: 14084
21 Sep 2013 07:59 PM
admins = {"Player1"}
game.Players.PlayerAdded:connect(function(newPlayer)
newPlayer:waitForChild("PlayerGui")
for i = 1, #admins do
if newPlayer.Name:lower() == admins[i]:lower() then
b = script.Parent.ScreenGui:clone()
b.Parent = newPlayer.PlayerGui
b.LocalScript.Disabled = false
end
end
end)
Report Abuse
darthpyro is not online. darthpyro
Joined: 18 Aug 2009
Total Posts: 3569
21 Sep 2013 08:01 PM
Robotmega, you've solved nothing, and only changed one line to do exactly the same thing.

Report Abuse
Melki3k10 is not online. Melki3k10
Joined: 08 Nov 2010
Total Posts: 469
21 Sep 2013 08:03 PM
I don't think that the wait is the problem here.
I tried your script Robot, and nothing happened.
Report Abuse
Dimethylmercury is not online. Dimethylmercury
Joined: 30 Apr 2013
Total Posts: 9701
21 Sep 2013 08:08 PM
I am sorry for wasting your time, I had been forgetting to test in online mode.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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