Plz help
game.ReplicatedStorage.EventBeam.OnServerEvent:Connect(function(player1) local Beam = game.ReplicatedStorage.PowerParts.Beam:Clone() Beam.Parent = game.Workspace local player = game.Workspace:FindFirstChild(player1.Name) Beam:SetPrimaryPartCFrame(CFrame.new(Beam.PrimaryPart.Position == (player.UpperTorso.Position + (player.LowerTorso.CFrame.LookVector*10)))) game.Workspace.sounds.BeamFire:Play() end)
In your SetPrimaryPartCFrame
function, you included a ==
. This is a relational operator, and it returns a boolean. Due to lack of context, I can't understand what you were trying to achieve, but this is what's causing the error. No CFrame constructor takes a boolean.
Beam:SetPrimaryPartCFrame(CFrame.new(player.UpperTorso.Position + player.LowerTorso.CFrame.LookVector*10))
Im not sure if this will work