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 » Scripters
Home Search
 

my script is faulty (simple function)

Previous Thread :: Next Thread 
sharpblaze2 is not online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
21 May 2015 03:57 PM
function explosionontouch()
explosion = Instance.new("Explosion", script.Parent)
end

script.Parent.Touched:connect(explosionontouch)

once i move the brick from its position, the explosion happens where i used to have it, not in its new location

the brick isnt anchored, and id like it for it not to be anchored

how can i fix this problem?
Report Abuse
BusyCityGuy is not online. BusyCityGuy
Joined: 17 Aug 2012
Total Posts: 2144
21 May 2015 03:59 PM
Set the position of the explosion I believe. Or Cframe... or something. Look at the properties of an explosion, it's in there somewhere. Set it to the part's new position or cframe.

-The [Guy]
Report Abuse
sharpblaze2 is not online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
21 May 2015 04:00 PM
do you think that this would work?

location = script.Parent.Position
Explosion.Position = location???
Report Abuse
MajikkuSoul is not online. MajikkuSoul
Joined: 15 Feb 2014
Total Posts: 196
21 May 2015 04:01 PM
script.Parent.Touched:connect(function()
local x = Instance.new("Explosion", script.Parent)
x.Position = script.Parent.Position
end)

Second time this good or bad


~ All you need to know is that I'm an otaku
Report Abuse
sharpblaze2 is not online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
21 May 2015 04:03 PM
@majik it didnt work q.q
Report Abuse
sharpblaze2 is not online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
21 May 2015 04:05 PM
o nvm it worked! :D
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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