Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Charging Particle Emitter script losing Particles, no error shown?

Asked by
Zesuq 3
3 years ago

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)

01-- Variables --
02local UIS = game:GetService("UserInputService")
03local Player = game.Players.LocalPlayer
04local character = Player.Character
05 
06local ChargeEmitter = game.Workspace.ChargeEmitter
07---
08UIS.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")
14    end
15 
View all 21 lines...

The problem arises when I try to make the ChargeEmitter the same position as my HumanoidRootPart

01-- Variables --
02local UIS = game:GetService("UserInputService")
03local Player = game.Players.LocalPlayer
04local character = Player.Character
05 
06local ChargeEmitter = game.Workspace.ChargeEmitter
07---
08UIS.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
15 
View all 27 lines...

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

1 answer

Log in to vote
0
Answered by
Zesuq 3
3 years ago

HUH?!?!? I restarted studio and now it works??? God I must be tripping holy shit. Anyways idk whether to close or let the thread stay in case people have an issue like this (Unlikely)

0
accept the answer, then it should be fine NarwhalAndMe 141 — 3y
Ad

Answer this question