MezornoIV
|
  |
| Joined: 20 Jul 2010 |
| Total Posts: 2276 |
|
|
| 20 Apr 2015 02:47 PM |
I'm trying to clone the Gui from Lighting, And make it's parent StarterGui's
script.Parent.Touched:connect(function() game.Lighting.ScreenGui:clone() ScreenGui.Parent = StarterGui end)
|
|
|
| Report Abuse |
|
|
|
| 20 Apr 2015 02:48 PM |
script.Parent.Touched:connect(function() local a = game.Lighting.ScreenGui:Clone() a.Parent = game.StarterGui end) |
|
|
| Report Abuse |
|
|
MezornoIV
|
  |
| Joined: 20 Jul 2010 |
| Total Posts: 2276 |
|
|
| 20 Apr 2015 02:49 PM |
| Ohhhhh, I tried doing the x = game.Lighting.ScreenGui:clone() bit, But I didn't use Local |
|
|
| Report Abuse |
|
|
MezornoIV
|
  |
| Joined: 20 Jul 2010 |
| Total Posts: 2276 |
|
| |
|
MezornoIV
|
  |
| Joined: 20 Jul 2010 |
| Total Posts: 2276 |
|
|
| 20 Apr 2015 02:51 PM |
| It clones, But It doesn't show up. |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 20 Apr 2015 02:53 PM |
that's because i am pretty sure you want to clone it to the player's playergui, not the startergui
|
|
|
| Report Abuse |
|
|
MezornoIV
|
  |
| Joined: 20 Jul 2010 |
| Total Posts: 2276 |
|
| |
|
MezornoIV
|
  |
| Joined: 20 Jul 2010 |
| Total Posts: 2276 |
|
|
| 20 Apr 2015 02:55 PM |
15:59:03.296 - Stack End 15:59:03.296 - PlayerGui is not a valid member of DataModel 15:59:03.296 - Script 'Workspace.Part.Script', Line 10 15:59:03.296 - Stack End
cri |
|
|
| Report Abuse |
|
|
MezornoIV
|
  |
| Joined: 20 Jul 2010 |
| Total Posts: 2276 |
|
|
| 20 Apr 2015 02:58 PM |
| Bump. Pretty simple script. I don't know why I'm not understanding it :( |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 20 Apr 2015 02:59 PM |
get the player with :GetPlayerFromCharacter(character)
script.Parent.Touched:connect(function(hit) if hit.Parent and hit.Parent:FindFirstChild("Humanoid") then local char = hit.Parent local plr = game.Players:GetPlayerFromCharacter(char) if plr then game.Lighting.GUI:Clone().Parent = plr.PlayerGui end end end)
btw don't use lighting to store stuff like that
use replicatedstorage or serverstorage |
|
|
| Report Abuse |
|
|
MezornoIV
|
  |
| Joined: 20 Jul 2010 |
| Total Posts: 2276 |
|
| |
|