yoshiegg6
|
  |
| Joined: 20 Jul 2012 |
| Total Posts: 3191 |
|
|
| 11 Jan 2015 03:33 PM |
How would I get to a persons playergui from their character?
script.parent.touched:Connect(function(stuff) hit.parent(WHATDOI DO HERE?) |
|
|
| Report Abuse |
|
|
|
| 11 Jan 2015 03:40 PM |
script.Parent.Touched:connect(function(hit) local p = game.Players:GetPlayerFromCharacter(hit.Parent) if p then local gui = p:FindFirstChild("PlayerGui") if gui then -- there you go end end end) |
|
|
| Report Abuse |
|
|
Ruzakiff
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 155 |
|
|
| 11 Jan 2015 03:43 PM |
function stuff(part) local parent=part.Parent if game.Players:GetPlayerFromCharacter(parent)then local name=parent.Name local derp=game.Players:findFirstChild(name) derp.PlayerGui.GUI.Visible=false end end script.Parent.Touched:connect(stuff)
SHOULD WORK, not sure, not tested, but gave it my best shot :P
|
|
|
| Report Abuse |
|
|