0

How can the part clone with a specific Y and X axis?

Edited 13 days ago

So when I clone the part out of the serverstorage it clones like layed down and I want it like straight but when I try to change the parts Y and X axis it doesnt work, since my knowlege of scripting is not that big I dont really know what to do

local OnePunch = game.ServerStorage.OnePunch game.ReplicatedStorage.PunchEvent.OnServerEvent:Connect(function(player)

local character = player.Character
local newPunch = OnePunch:Clone()
newPunch.CFrame = character.HumanoidRootPart.CFrame
newPunch.Anchored = true
newPunch = Vector3.new(-168.012,46.197,newPunch.Position.Z) --this is what i need help with

newPunch.Parent = workspace

local touchcon

touchcon = newPunch.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if hit.Parent.Name ~= player.Name then
hit.Parent:BreakJoints()
if touchcon ~= nil then touchcon:Disconnect () end
newPunch:Destroy()
end
end
end)

wait(2)

if touchcon ~= nil then touchcon:Disconnect () end
newPunch:Destroy()


end)

newPunch.CFrame = character.HumanoidRootPart.CFrame * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))