Slashbeam tutorial script not functioning?

I would like this script to function would you be able to see if I’ve done anything wrong or maybe an update broke certain code

Here are some screen caps of my code and coloring in the app
ScriptModelPlacement


StarterCharacterScripts_LocalScript

local UserInputService = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local debounce = false
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local slashbeam = ReplicatedStorage:WaitForChild("Slashbeam")

repeat wait() until player.Character.Humanoid
local humanoid = player.Character.Humanoid
local anim = Instance.new("Animation")
anim.AnimationId = "https://www.roblox.com/asset/?id=7559130660"

UserInputService.InputBegan:Connect (function(Input, IsTyping)
	if not IsTyping then
		if not debounce then
			debounce = true
			if Input.KeyCode == Enum.KeyCode.Q then
				local playAnime = humanoid:LoadAnimation(anim)
				ReplicatedStorage.Slashbeam:FireServer()
				wait(0.1)
				playAnim:Play()
			end
			wait(0.5)
			debounce = false
		end
	end
end)

local slashbeam = game.ServerStorage:WaitForChild("slashbeam")
local damage = 20

game.ReplicatedStorage.Slashbeam.OnServerEvent:Connect(function(player, CFrame)
	local character = player.Character
	local newSkill = slashbeam:Clone()
	newSkill.CanCollide = false
	newSkill.CFrame = character.HumanoidRootPart.CFrame
	local bv = Instance.new(4000,6000,6000)
	bv.Velocity = (character.HumanoidRootPart.CFrame.lookVector*240)
	bv.Parent = newSkill
	local playerpostion = character.HumanoidRootPart.Postion
	newSkill.Parent = workspace
	local skillHit
	skillHit = newSkill.Touched:Connect(function(hit)
		if hit.Parent:FindFirstChild ("Humanoid") then
			if hit.Parent.Name ~= Player.Name then
				hit.Parent.Humanoid:TakeDamage(damage)
			end
		end
	end)
	while wait(0.5) do
		local distance = (playerposition - newSkill.Postion).magnitude
		if distance > 60 then
			newSkill:Destroy()
		end
	end
	wait (2)
	if skillHit ~= nil then
		skillHit:Disconnect()
	end
	newSkill:Destroy()
end)

I don’t understand why it isn’t working like just nothing happens

I’ve tried multiple scripts and none seem to work even ones from current year I’m beginning to think it has something to do with these things which show up red

I realised I messed up this bit and fixed it

	newSkill.CFrame = character.HumanoidRootPart.CFrame
	local bv = Instance.new("BodyVelocity")
	bv.MaxForce = Vector3.new (4000,6000,6000)
	bv.Velocity = (character.HumanoidRootPart.CFrame.lookVector*240)

However still not functioning