|
| 26 Mar 2017 04:42 PM |
Hello, I am working on a button that when when its tranparency is 1 then clone a GUI and put it into the PlayerGui!
while true do wait(0.1) local owner = script.Parent.Parent.Parent.Owner.Value if script.Parent.Head.Transparency == 1 then game.Lighting.Part2:Clone().Parent = game.Players.owner.PlayerGui end end |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2017 04:43 PM |
There are no issues in the output, but it doesnt clone or put it into the Player GUI
|
|
|
| Report Abuse |
|
|
|
| 26 Mar 2017 04:44 PM |
I take that back, on the output it says something is wrong with line 5
22:40:41.526 - Script 'Workspace.CrazyGames.Tycoons.Fighting Bears.Buttons.Buy Office Table- [$0].Script', Line 5 |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 Mar 2017 04:47 PM |
You are trying to clone a part into a gui?
|
|
|
| Report Abuse |
|
|
|
| 26 Mar 2017 04:48 PM |
| Its a GUI but I named it Part :P |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 Mar 2017 04:51 PM |
Is the owner value a String or the actual player? If it's just a string, you need to say game.Players[owner].PlayerGui
|
|
|
| Report Abuse |
|
|
|
| 26 Mar 2017 04:53 PM |
| its an ObjectValue, Im not sure how they work |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 Mar 2017 04:54 PM |
game.Lighting.Part2:Clone().Parent = owner.PlayerGui
|
|
|
| Report Abuse |
|
|
|
| 26 Mar 2017 04:54 PM |
| Im having the same problem when I put [owner].PlayerGui |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 Mar 2017 04:55 PM |
Also it's very bad practice to store things in the Lighting anymore, that's pretty ghetto storage. Use ReplicatedStorage or ServerStorage instead.
|
|
|
| Report Abuse |
|
|
|
| 26 Mar 2017 04:56 PM |
Im having the same problem with
while true do wait(0.1) local owner = script.Parent.Parent.Parent.Owner.Value if script.Parent.Head.Transparency == 1 then game.Lighting.Part2:Clone().Parent = owner.PlayerGui end end
Im confused there doesnt seem to be anything wrong |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 Mar 2017 04:57 PM |
So it's an ObjectValue, and it's properly pointing to the player? try printing "owner" and see if it's nil.
|
|
|
| Report Abuse |
|
|
Thedagz
|
  |
| Joined: 10 Mar 2012 |
| Total Posts: 798 |
|
|
| 26 Mar 2017 04:57 PM |
| Does the head ever turn transparent? |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2017 04:58 PM |
| okay, and yes It does go Transparent |
|
|
| Report Abuse |
|
|
Thedagz
|
  |
| Joined: 10 Mar 2012 |
| Total Posts: 798 |
|
|
| 26 Mar 2017 04:58 PM |
| you should also check if transparency is more then 1 |
|
|
| Report Abuse |
|
|
| |
|
|
| 26 Mar 2017 05:02 PM |
| I can confirm it works, When I am not the owner it says Nil but when i become the owner it changes to Player1(x14221 ect) |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2017 05:03 PM |
| It just doesnt seem to be cloning? |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2017 05:03 PM |
I suggest makeing a array then iterateing through it to check who is the owner if they are the owner then do what ever.
R$0 |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2017 05:05 PM |
| Thats nothing to do with the script, Stop saying random stuff to get more posts. I am trying to figure this out. |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2017 05:06 PM |
array = table tables are used in stuff like admin scripts and stuff and what your trying to do is basically make perks for certain people so.
R$0 |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2017 05:07 PM |
All im seeing is "OWNER" so it's a fair assumption.
R$0 |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2017 05:10 PM |
| when you walk into the door it take your name and makes you the owner. |
|
|
| Report Abuse |
|
|