Hello, I currently have a system to where it creates a giant beam. But when you create the next beam and the old beam is still there, it goes in front of the beam.
I know its something with Mouse.TargetFilter but that’s it.
Here’s the code:
m.KeyDown:connect(function(key)
key = key:lower()
if key == "2" and game.Players.LocalPlayer.Stats.CanAttack.Value == true then
game.Players.LocalPlayer.Stats.CanAttack.Value = false
game.Players.LocalPlayer.Stats.Phase.Value = "Attacking"
local plr = game.Players.LocalPlayer
local char = plr.Character
local hum = char.Humanoid
local anim = hum:LoadAnimation(script:FindFirstChild("FireAnim"))
local Lightning = script.Effect.Thunder:Clone()
Lightning.Parent = char["Left Arm"]
Lightning.TrailElectricity.Script.Disabled = false
local Lightning = script.Effect.Thunder:Clone()
Lightning.Parent = char["Right Arm"]
Lightning.TrailElectricity.Script.Disabled = false
local Speed = hum.WalkSpeed
local Jump = hum.JumpPower
hum.WalkSpeed = 0
hum.JumpPower = 0
anim:Play()
script.Sound:Play()
wait(1)
script.AttackEvent:FireServer(Mouse.Hit.p)
The script creates the actual part.
Thank you! Any help would be appreciated!