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: What is wrong with this?

Previous Thread :: Next Thread 
thombot2 is not online. thombot2
Joined: 15 Oct 2008
Total Posts: 104
14 Jul 2013 04:07 PM
Can someone help please? I want to insert smoke into the brick that is being touched.

function onTouch(part)

game.Workspace.Part.Instance.New("Smoke")

end

script.Parent.Touched:connect(onTouch)

What is wrong?
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
14 Jul 2013 04:09 PM
function onTouch(part)
smoke = Instance.new("Smoke",part)
--edit other properties

end

script.Parent.Touched:connect(onTouch)
Report Abuse
petro180 is not online. petro180
Joined: 30 Mar 2009
Total Posts: 354
14 Jul 2013 04:10 PM
function onTouch(part)
Instance.new("Smoke", workspace.Part)
end
script.Parent.Touched:connect(onTouch)
Report Abuse
Zkiller11 is not online. Zkiller11
Joined: 25 Aug 2009
Total Posts: 2914
14 Jul 2013 04:10 PM
function onTouch(part) -- You don't need to put part as an argument, but eh
local lol = Instance.new("Smoke", game.Workspace.Part)
end

script.Parent.Touched:connect(onTouch)

You did the Instance.new part wrong, that's all.
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
14 Jul 2013 04:17 PM
However, he wants to put the smoke into the part he is touching. In that case he does need to define part as an argument. My script is what he is looking for
Report Abuse
Hergest is not online. Hergest
Joined: 17 May 2011
Total Posts: 309
14 Jul 2013 04:17 PM
You didn't give the smoke a location et cetera.
Report Abuse
Zkiller11 is not online. Zkiller11
Joined: 25 Aug 2009
Total Posts: 2914
14 Jul 2013 04:17 PM
Darn it, I missed that. Yea, you're right then.
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
14 Jul 2013 04:24 PM
Location of smoke is part...
Report Abuse
Alec2260 is not online. Alec2260
Joined: 27 Dec 2008
Total Posts: 241
14 Jul 2013 04:26 PM
Instance.new("Smoke")
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