Attempt to call a RBXScriptSignal value

I know there has been posts on this error but I don’t understand whats wrong can someone help?

The error is on line 16

Code:

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")

local Beam = script:WaitForChild("Beam"):Clone()

local function CreateBeam(Beam, Attachment0, Part)
	local Attachment1 = Part:FindFirstChild("Attachment")
	
	if Attachment1 then
		Beam.Attachment0 = Attachment0
		Beam.Attachment1 = Attachment1
	end
end

game.ReplicatedStorage.ArrowEvent.OnClientEvent(function(Part, Value)
	if Value == true then
		local Attachment0 = HumanoidRootPart:FindFirstChild("RootRigAttachment")
		CreateBeam(Beam, Attachment0, Part)
		Beam.Parent = Character
	else
		Beam:Remove()
	end
end)
1 Like

Change that to:

game.ReplicatedStorage.ArrowEvent.OnClientEvent:Connect(function(Part, Value)

You forgot to connect the event.

2 Likes