It keeps saying that Vector 3 is expected instead of a cframe as a new argument #1, but how can a vector 3 define the orientation,and if it can what should i put? Here's the script, look at the bottom:

wait()
local event = script.Parent


event.OnServerEvent:Connect(function(player, Hit)
	
	
	local anim = player.Character.Humanoid:LoadAnimation(script.Charge)
	
	anim:Play()

local darknebula = Instance.new("Part")
darknebula.Shape = "Ball"
darknebula.Parent = player.Character.RightHand
darknebula.Size = Vector3.new(35, 35, 35)
darknebula.Color = Color3.fromRGB(0, 0, 0)
darknebula.Material = "Neon"
darknebula.Name = "darknebula"
darknebula.Massless = true
darknebula.CanCollide = false

local weld = Instance.new("Weld")
weld.Name = "Weld"
weld.Parent = darknebula
weld.Part1 = darknebula
weld.Part0 = player.Character.RightHand
weld.C0 = CFrame.new(0, 0, 0)
weld.C1 = CFrame.new(0, 35, 0)



local bg = Instance.new("BodyGyro",player.Character.UpperTorso)
bg.Name = "skillgyro"
bg.D = 100
bg.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)

local bp = Instance.new("BodyPosition",player.Character.UpperTorso)
bp.Name = "skillposition"
bp.Position = player.Character.HumanoidRootPart.Position
bp.MaxForce = Vector3.new(math.huge, math.huge, math.huge)


local Pos = Hit.p
bg.CFrame = CFrame.new(player.Character.UpperTorso.CFrame,Pos)

1 comment

0

line 44 is not valid you need CFrame.new(Vector3 positon, Vector3 lookAt) use .p