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: Local Script. :|

Previous Thread :: Next Thread 
Virtualdarks is not online. Virtualdarks
Joined: 19 Aug 2008
Total Posts: 12345
08 Feb 2012 05:17 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)

---

The output says no error, yet it performs nothing. Anyone mind correcting me?

-Virtualdarks
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
08 Feb 2012 05:18 PM
Shouldn't be a ; I'm pretty sure.
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
08 Feb 2012 05:19 PM
@Colt, that's a method of coding. Please make more..Reliable remarks.


@OP; You never defined gui.
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
08 Feb 2012 05:20 PM
';' is fine, it doesn't really matter, it just means the end of a line which Lua automatically does. Try this?

local player = game.Players.LocalPlayer;

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

~I script Awesome sauce to go with my spaghetti code
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
08 Feb 2012 05:24 PM
local player = game.Players.LocalPlayer;
script.Parent.MouseButton1Click:connect(function()
player.TeamColor = Color3.new(r/255,g/255,b/255)
player.Character.BreakJoints()
end)

† KMXD †
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
08 Feb 2012 05:25 PM
TeamColor is a BrickColor value


player.TeamColor = BrickColor.new("Blah")
Report Abuse
Virtualdarks is not online. Virtualdarks
Joined: 19 Aug 2008
Total Posts: 12345
08 Feb 2012 05:28 PM
It works, Crazyman32. :D Thanks. :)

-Virtualdarks
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
08 Feb 2012 05:29 PM
@Crazy

I knew that...

local player = game.Players.LocalPlayer;
script.Parent.MouseButton1Click:connect(function()
player.TeamColor = BrickColor.new(Really black) --Or whatever
player.Character.BreakJoints()
end)

† KMXD †
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
08 Feb 2012 05:29 PM
Oh.. and my scripts failed anyways :c

".BreakJoints"...

† KMXD †
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
08 Feb 2012 05:29 PM
No problem! It should have raised an error for that though.

Something like "Expected BrickColor; got Color3 value"
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