|
| 17 Nov 2012 07:00 PM |
| I get the relationship with actuall parts with characters. You touch a button, AKA hit/Button, and hits parent is your character. What i DO NOT get is the relationship is with GUI. Hit/Part = ?/GUI. All I could link it to was Player, not character. I tried the word Click.Parent but it didn't work. Help please? |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 07:03 PM |
| game.Players[Click.Parent.Name]PlayerGui |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Nov 2012 07:08 PM |
| SO scripts accept "Name" as the character's physical body in workspace then? |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 07:12 PM |
No In your script "Click" is the player that clicked it
game.Players goes to the game, The players
Then [Click.Name] finds the name of "Click" (Click is whoever clicked it)
So its like
game.Players.NAMEHERE.PlayerGui |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 07:18 PM |
When I use the word Click, it always say "attempt to index global 'Click' (a nil value)" in output |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Nov 2012 07:23 PM |
local g = game.Lighting.Brute.Arm1:clone() (I'm working on a morph for the character) g.Parent = game.Players[Click.Parent.Name]Workspace (Enters Arm1 into The clickers "name", which is found in the workspace. |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 07:28 PM |
function onClicked(Player) game.Players[Player.Name].PlayerGui end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Edit this to work for what you need
But why are you trying to find them on the player list if you want to add a brick into the player?
function onClicked(Player) Player.Head:remove() end script.Parent.ClickDetector.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 07:31 PM |
| I'm doing that in reverse. At first i thought you had to go ScreenGui - PlayerGui - Players - then to the clicker's character somehow. |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 07:33 PM |
Well if you do that, It would cause it to not error if something in the workspace was named the same as the player.
function onClicked(Player) game.Players[Player].Character.Head:Destroy() end script.Parent.ClickDetector.MouseClick:connect(onClicked)
|
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 07:39 PM |
So just Player.Character can connect it O.o?
|
|
|
| Report Abuse |
|
|
| |
|