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: Broken Script

Previous Thread :: Next Thread 
wwaaffllee4 is not online. wwaaffllee4
Joined: 13 Jun 2010
Total Posts: 9
25 Aug 2011 10:05 AM
function onTouch()
fire=Instance.new("Fire")
fire.Parent=game.Workspace
fire.Name="Fire"
fire.Heat=(25)
fire.Size=(30)
fire.Position=script.Parent.Position
local msg=Instance.new("Message")
msg.Text="Something"
msg.Parent=game.Workspace
msg.Name="MSG"
wait(2)
a:remove()
end

script.Parent.Touched:connect(onTouch)

Can someone tell me what's wrong with this?
Report Abuse
UFAIL2 is online. UFAIL2
Joined: 14 Aug 2010
Total Posts: 6905
25 Aug 2011 10:08 AM
Always include Output. I'm not fixing, I'm adding comments so you can fix it yourself.

function onTouch()
fire=Instance.new("Fire")
fire.Parent=game.Workspace -- Parent it to the part.
fire.Name="Fire"
fire.Heat=25
fire.Size=30
fire.Position=script.Parent.Position -- You can't set the position of the fire, only the Part it's in.
local msg=Instance.new("Message")
msg.Text="Something"
msg.Parent=game.Workspace
msg.Name="MSG"
wait(2)
a:remove() -- Never defined what a is.
end
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
25 Aug 2011 10:10 AM
[ Content Deleted ]
Report Abuse
UFAIL2 is online. UFAIL2
Joined: 14 Aug 2010
Total Posts: 6905
25 Aug 2011 10:10 AM
Oops, I edited 2 lines instead of adding comments, so I'll post the two lines not edited and tell you what I did with them.

fire.Heat=(25)
fire.Size=(30)

You don't need the brackets surrounding the numbers.
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