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
 

Re: Scripting with ParticleEmitters

Previous Thread :: Next Thread 
legofansrule is not online. legofansrule
Joined: 11 Dec 2010
Total Posts: 210
29 Sep 2015 07:39 PM
Hi,

So lately I've been working on a morph for a roleplaying game, and I was trying to incorporate a particle emitter into the morph that could be toggled on and off based off of a GUI that was built into the morph. This GUI completely blank reads as:

local player = script.Parent.Parent.Parent.Parent.Parent

function onClick(mouse)

player.Character.Chest. --- Continue this with a brick inside the Chest, and do for example .Transparency = 0
player.Character.Chest. --- If you want to enable fire, continue with the brick the fire is in, and type Fire.Enabled = true




end

script.Parent.MouseButton1Down:connect(onClick)

--- Replace the Chest with Arm1, Arm2, Leg1, Leg2 or whatever you want.
--- You can even use it to effect on character's parts, typing for example player.Character.Head.face.Transparency = 0

_______________________________________________________________________________________

So, what I'd like to do is put a ParticleEmitter in the Chest area of the morph, and have both an on and off script toggle it. My main issue is that when I tried to do the Chest.ParticleBlock.ParticleEmitter.Enabled = true, nothing happened. I'm not sure what I'm doing wrong. When the game initially starts, does the ParticleEmitter need to be enabled or disabled, or does there need to be a script inside it?

Any help would be greatly appreciated. I'll reply if you need any further information on the morph's layout with GUIs, etc.
Report Abuse
legofansrule is not online. legofansrule
Joined: 11 Dec 2010
Total Posts: 210
29 Sep 2015 10:42 PM
Bump
Report Abuse
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
29 Sep 2015 10:44 PM
that is plain wrong


you have an incomplete line in player.Character.Chest.
Report Abuse
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
29 Sep 2015 10:45 PM
game.Workspace.Cooldude. -- it totally makes sense to do this! Whatever i'll just keep typing okokok
.Head:remove()
Report Abuse
Blues714 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
29 Sep 2015 10:51 PM
Torso*
Report Abuse
Blues714 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
29 Sep 2015 10:52 PM
oops oh wait

ur using morphs

ok

disregard my previous post
Report Abuse
Ripepperoni is not online. Ripepperoni
Joined: 04 Jul 2010
Total Posts: 5715
29 Sep 2015 11:16 PM
local player = script.Parent.Parent.Parent.Parent.Parent
why not

local player = game.Players.LocalPlayer

you better be using a local script
Report Abuse
legofansrule is not online. legofansrule
Joined: 11 Dec 2010
Total Posts: 210
30 Sep 2015 06:51 PM
So, I've tried Rip's approach, and it doesn't seem to be working; again, I'm not sure why.

Location for ParticleEmitter: Morph-Beta>MorphName>Morph>Chest>ParticleEffect (block that houses emitter)>ParticleEmitter

Location for GUI that disables fire (enabling is the same except it reads true instead of false): Morph-Beta>MorphName>Morph>Head>GuiMain>Frame>Button (there are 4 installed, the other 2's scripts have been removed since they aren't necessary)>LocalScript

The script reads as follows:

local player = script.Parent.Parent.Parent.Parent.Parent

function onClick(mouse)

player.Character.Chest. --- Continue this with a brick inside the Chest, and do for example .Transparency = 1
player.Character.Chest.ParticleEffect.ParticleEmitter.Enabled = false --- If you want to unenable fire, continue with the brick the Fire is in, and type Fire.Enabled = false




end

script.Parent.MouseButton1Down:connect(onClick)

--- Replace the Chest with Arm1, Arm2, Leg1, Leg2 or whatever you want.
--- You can even use it to effect on character's parts, typing for example player.Character.Head.face.Transparency = 1
Report Abuse
legofansrule is not online. legofansrule
Joined: 11 Dec 2010
Total Posts: 210
01 Oct 2015 10:39 PM
Bump x2
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
01 Oct 2015 10:42 PM
IT Tech support mode go?

Are you sure the script isn't erroring?
Report Abuse
legofansrule is not online. legofansrule
Joined: 11 Dec 2010
Total Posts: 210
02 Oct 2015 07:16 PM
If the script is erroring, I literally have no idea how. I'm not sure if there's even a ParticleEmitter.Enabled = true/false function that you can use. Although I've tried a similar script with fire and the fire turn off GUI doesn't work to any extent.
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
02 Oct 2015 07:21 PM
@cody Have you tried turning it off and back on?
Report Abuse
legofansrule is not online. legofansrule
Joined: 11 Dec 2010
Total Posts: 210
03 Oct 2015 12:20 AM
Yeah, I tried clicking the Enabled = false button then clicking the Enabled = true button and vice versa, but nothing happened whatsoever. At this point I don't even think there's an enabled property for particle emitters yet.
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