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: Scripting Help!

Previous Thread :: Next Thread 
Awsomisticguy537 is not online. Awsomisticguy537
Joined: 03 Dec 2010
Total Posts: 507
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
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
17 Nov 2012 07:03 PM
game.Players[Click.Parent.Name]PlayerGui
Report Abuse
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
17 Nov 2012 07:04 PM
Click.Name*
Report Abuse
Awsomisticguy537 is not online. Awsomisticguy537
Joined: 03 Dec 2010
Total Posts: 507
17 Nov 2012 07:08 PM
SO scripts accept "Name" as the character's physical body in workspace then?
Report Abuse
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
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
Awsomisticguy537 is not online. Awsomisticguy537
Joined: 03 Dec 2010
Total Posts: 507
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
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
17 Nov 2012 07:20 PM
Can I see the script?
Report Abuse
Awsomisticguy537 is not online. Awsomisticguy537
Joined: 03 Dec 2010
Total Posts: 507
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
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
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
Awsomisticguy537 is not online. Awsomisticguy537
Joined: 03 Dec 2010
Total Posts: 507
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
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
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
Awsomisticguy537 is not online. Awsomisticguy537
Joined: 03 Dec 2010
Total Posts: 507
17 Nov 2012 07:39 PM
So just Player.Character can connect it O.o?
Report Abuse
Awsomisticguy537 is not online. Awsomisticguy537
Joined: 03 Dec 2010
Total Posts: 507
17 Nov 2012 07:43 PM
O.o it works THANK YOU
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