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: Anyone plz?

Previous Thread :: Next Thread 
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
22 Oct 2012 11:31 AM
this is a script of mine and I can't check output because it is supposed to happen when a person talks (me)

You can get a copy of the model or look at the script below : http://www.roblox.com/Help-PLZ-item?id=95784554
what do you think is wrong?'


if string.sub(msg:lower(), 1, 13) == "wheels/orange" then
for _,v in pairs(game.Workspace.Camaro:GetChildren())do
if v.Name=="Wheels"then
v.BrickColor=BrickColor.new("Deep orange")
end
end
end
game.Players.PlayerAdded:connect(function(player)
if player.Name:lower() == "theuntimelydoctor" then
player.Chatted:connect(chat)
end
end)
Report Abuse
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
22 Oct 2012 11:36 AM
Anyone here?
Report Abuse
bigmotorsicklemax is not online. bigmotorsicklemax
Joined: 06 May 2012
Total Posts: 19
22 Oct 2012 11:40 AM
You didn't have a function called Chat. Connect the function AFTER the actual function ends,not the start. That makes it more confusing.
Report Abuse
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
22 Oct 2012 11:41 AM
Huh? BTW update output says this (even when I don't talk) (line 1) attempt to index global 'msg' (a nil value)
Report Abuse
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
22 Oct 2012 11:43 AM
...
Report Abuse
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
22 Oct 2012 12:15 PM
BUNP
Report Abuse
nominate10 is not online. nominate10
Joined: 20 May 2008
Total Posts: 2545
22 Oct 2012 12:20 PM
You forgot to wrap your message code in a function, so that it can be connected to an event.

function chat(msg)
if string.sub(msg:lower(), 1, 13) == "wheels/orange" then
for _,v in pairs(game.Workspace.Camaro:GetChildren())do
if v.Name=="Wheels"then
v.BrickColor=BrickColor.new("Deep orange")
end
end
end
end
game.Players.PlayerAdded:connect(function(player)
if player.Name:lower() == "theuntimelydoctor" then
player.Chatted:connect(chat)
end
end)
Report Abuse
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
22 Oct 2012 12:32 PM
I updated the model, now there is no syntax but it isn't doing anything. Please take a look at the model.
Report Abuse
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
22 Oct 2012 12:41 PM
F.Y.I Wheels is a group of 4 wheels is the problem that I'm trying to change the group's color instead of its children (I want to change its children) if so how would I do that?
Report Abuse
nominate10 is not online. nominate10
Joined: 20 May 2008
Total Posts: 2545
22 Oct 2012 12:41 PM
Are you testing in Solo or Online mode?

In Solo mode, the player joins the game before scripts are run, therefore missing the PlayerAdded event.
Report Abuse
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
22 Oct 2012 12:56 PM
I'm doing it on online mode. What should I do? Also am I selecting the children of wheels and changing the color of them?
Report Abuse
bigmotorsicklemax is not online. bigmotorsicklemax
Joined: 06 May 2012
Total Posts: 19
22 Oct 2012 01:03 PM
Wheels?
Report Abuse
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
22 Oct 2012 01:10 PM
@big it is a car for more info look at the model link at the top of the page.
Report Abuse
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
22 Oct 2012 05:58 PM
BUMP (REALLY need help D:)
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
22 Oct 2012 06:00 PM
There's no error in your script. Why not manually change the Brickcolor of the wheels?
Report Abuse
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
22 Oct 2012 06:05 PM
Because I have orange, blue, green, etc it is a voice customized car. I started with the wheels. Can you take a look at the model for me because it doesn't seem to work even though there is no errors (Make sure to change the name to your name)
Report Abuse
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
22 Oct 2012 06:44 PM
bump
Report Abuse
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
23 Oct 2012 04:27 PM
Bump
Report Abuse
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
23 Oct 2012 05:09 PM
BUMP
Report Abuse
theuntimelydoctor is not online. theuntimelydoctor
Joined: 30 Jun 2011
Total Posts: 718
24 Oct 2012 01:48 PM
Bring
Up
My
Problem
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