Here is my current code


local function summonWave(player, playerPos)
	local clonedAbility = ability:Clone()
	clonedAbility.Parent= workspace
	local rootPart = clonedAbility.PrimaryPart
	clonedAbility:SetPrimaryPartCFrame(CFrame.new(player.Character.PrimaryPart.Position + player.Character.PrimaryPart.CFrame * CFrame.Angles(0,0,-90)))

clonedAbility:SetPrimaryPartCFrame(CFrame.new(player.Character.HumanoidRootPart.Position.X, player.Character.HumanoidRootPart.Position.Y,player.Character.PrimaryPart+ player.Character.HumanoidRootPart.CFrame.LookVector))

end

abilityEvent.OnServerInvoke = summonWave

I know this is a bit hard to read as I didn't make much variables . I get the wall to spawn where the player is at but I'm not sure how to rotate it

Note: I'm trying to rotate the Z Coordinate

1 comment

0
  • CFrame.Angles(0,0,math.rad(-90)) first issue, second issue, multiply all CFrames (convenient to remember), third multiply lookvector with number since it is a unit vector / normal vector.