|
| 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 |
|
|
| |
|
|
| 29 Sep 2015 10:44 PM |
that is plain wrong
you have an incomplete line in player.Character.Chest.
|
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
| |
|
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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 01 Oct 2015 10:42 PM |
IT Tech support mode go?
Are you sure the script isn't erroring? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 02 Oct 2015 07:21 PM |
| @cody Have you tried turning it off and back on? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|