Charging Particle Emitter script losing Particles, no error shown?
Basically trying to make a script that puts a part called ChargeEmitter in my humanoid so that I can make the particles appear out of my humanoid (Not doing Cframe and other stuff as I'm new to scripting I'm just testing out if I understand the UserInputservice)
I got this far and it works perfectly, the part appears in HumanoidRootPart however it clones in the exact position of where my orignal emitter is (Not on my avatar)
02 | local UIS = game:GetService( "UserInputService" ) |
03 | local Player = game.Players.LocalPlayer |
04 | local character = Player.Character |
06 | local ChargeEmitter = game.Workspace.ChargeEmitter |
08 | UIS.InputBegan:Connect( function (input) |
09 | if input.KeyCode = = Enum.KeyCode.G then |
10 | Summon_Emitter = ChargeEmitter:Clone() |
11 | Summon_Emitter.Parent = character.HumanoidRootPart |
12 | Summon_Emitter.Name = "SummonedEmitter" |
13 | print ( "Emitter Working" ) |
17 | UIS.InputEnded:Connect( function (input) |
18 | if input.KeyCode = = Enum.KeyCode.G then |
19 | character.HumanoidRootPart.SummonedEmitter:Destroy() |
20 | print ( "Emitter Destroyer Working" ) |
The problem arises when I try to make the ChargeEmitter the same position as my HumanoidRootPart
02 | local UIS = game:GetService( "UserInputService" ) |
03 | local Player = game.Players.LocalPlayer |
04 | local character = Player.Character |
06 | local ChargeEmitter = game.Workspace.ChargeEmitter |
08 | UIS.InputBegan:Connect( function (input) |
09 | if input.KeyCode = = Enum.KeyCode.G then |
10 | Summon_Emitter = ChargeEmitter:Clone() |
11 | Summon_Emitter.Parent = character.HumanoidRootPart |
12 | Summon_Emitter.Name = "SummonedEmitter" |
13 | bruh = game.Players.LocalPlayer.Character.HumanoidRootPart.Position |
14 | Summon_Emitter.Position = bruh |
16 | print (bruh , " Is the position of the Summoned " ) |
17 | print ( "Emitter Working" ) |
21 | UIS.InputEnded:Connect( function (input) |
22 | if input.KeyCode = = Enum.KeyCode.G then |
23 | character.HumanoidRootPart.SummonedEmitter:Destroy() |
24 | print ( "Emitter Destroyer Working" ) |
No error is shown, the part appears inside my humanoidrootpart AND in the same location however it loses all it's children (The Particle emitters). The full script is ran without any error that can help me debug why the particles are gone.
(Sorry if I used wrong terminology somewhere, I got into scripting basics some time ago and quit. Now I have a load of free time so I'm trying to understand. I am still at basic level so Idk how to do cframe and fancy stuff that makes the part appear below me
Sorry for any Grammar / Spelling mistakes too English isn't my first language