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: Click click

Previous Thread :: Next Thread 
Virtualdarks is not online. Virtualdarks
Joined: 19 Aug 2008
Total Posts: 12345
08 Feb 2012 04:53 PM
gui.MouseButton1Click:connect(function()
-A-
end)

---

Where -A- should be is a line that allows me to access the player's data, like TeamColor. Sadly, I don't know how to perform this. Can someone please help me?

-Virtualdarks
Report Abuse
C0D3Y is not online. C0D3Y
Joined: 24 Jul 2010
Total Posts: 1692
08 Feb 2012 05:00 PM
A = script.Parent(Text Button).Parent(Frame).Parent(ScreenGUI).Parent(PlayerGUI).Parent(Player)
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
08 Feb 2012 05:05 PM
If this script is in a LocalScript ( like all tools and gui's should be ) then all you would have to do is

    local player=game.Players.LocalPlayer;
Report Abuse
Virtualdarks is not online. Virtualdarks
Joined: 19 Aug 2008
Total Posts: 12345
08 Feb 2012 05:06 PM
@SDuke524

So:

---

player.TeamColor

---

Would work?

-Virtualdarks
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
08 Feb 2012 05:07 PM
Yes. As long as you're using a LocalScript.
Report Abuse
Virtualdarks is not online. Virtualdarks
Joined: 19 Aug 2008
Total Posts: 12345
08 Feb 2012 05:09 PM
Sounds good.

-Virtualdarks
Report Abuse
Virtualdarks is not online. Virtualdarks
Joined: 19 Aug 2008
Total Posts: 12345
08 Feb 2012 05:12 PM
local player = game.Players.LocalPlayer;

gui.MouseButton1Click:connect(function()
player.TeamColor = Color3.new(0/255,255/255,255/255)
player.Character.Humanoid.Health = 0
end)

---

Is there a reason why that doesn't work?

-Virtualdarks
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
08 Feb 2012 05:49 PM
1. Make sure that it's in a LocalScript
2. Where is gui defined?
3. Color3.new(0/255,255/255,255/255)==Color3.new(0,1,1)
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