I tested it my self and found that you need to get the char when they activate not when the script first runs.
Change clonedBeam.Weld.Part0 = char:FindFirstChild(“Head”)
to clonedBeam.Weld.Part0 = Tool.Parent:FindFirstChild(“Head”)
I tested it my self and found that you need to get the char when they activate not when the script first runs.
Change clonedBeam.Weld.Part0 = char:FindFirstChild(“Head”)
to clonedBeam.Weld.Part0 = Tool.Parent:FindFirstChild(“Head”)
i did it and:
im half way there
--||Service||--
local Runservice = game:GetService("RunService")
local UserInput = game:GetService("UserInputService")
local RS = game:GetService("ReplicatedStorage")
--||Variables||--
local Tool = script.Parent
local Beam = RS.BEAMPART
local Debounce = true
local flare1 = Tool.Handle.Flare1
local flare2 = Tool.Handle.Flare2
Tool.Equipped:Connect(function()
flare1.Parent = Tool.Parent:FindFirstChild("Head")
flare2.Parent = Tool.Parent:FindFirstChild("Head")
flare1:Emit(5)
flare2:Emit(5)
end)
Tool.Activated:Connect(function()
if Debounce then
Debounce = false
print(Tool.Parent.Name)
local clonedBeam = Beam:Clone()
clonedBeam.Parent = workspace
clonedBeam.Weld.Part0 = Tool.Parent:FindFirstChild("Head")
clonedBeam.Weld.Part1 = clonedBeam
clonedBeam.Weld.C0 = CFrame.new(0, 0, 21) * CFrame.Angles(0, 90, 0)
clonedBeam.Weld.C1 = CFrame.new(0,0,0)
task.wait(1)
clonedBeam:Destroy()
Debounce = true
end
end)
it worked tysm!!!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.