Cloned parts descendants orientated incorrectly, how do i orientate them correctly?

  1. What do you want to achieve? Trying to orientate the particles part and rocks that spawn so they are flat on the ground instead of sideways

  2. What is the issue? rocks and particles spawn on their side instead of flat on the ground

  3. What solutions have you tried so far? tried messing around with orientation of the rocks via script and properties, nothing helped. also tried messing with the orientation of the welds. did not help either. searched thoroughly on the forums, lua page and youtube. tried doing effects.rock.orientation and root.boulder.Rock.orientation. tried vectors3’s too

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

-- local effects = game.ReplicatedStorage.BoulderFX:WaitForChild("BoulderEffects"):Clone() 

local start = script.Start
local second = script.Second

local player = game.Players.LocalPlayer
local char = player.Character
local root = char.HumanoidRootPart



Tool.Activated:Connect(function(processed)
	if processed then return end	
	if Debounce == false then
		Debounce = true
		
		local Humanoid = Tool.Parent:WaitForChild("Humanoid")
		
		re:FireServer(mouse.Hit)
		start:Play()
		
		wait(.2)
		
		local AnimTrack = Humanoid:LoadAnimation(slingShot)
		AnimTrack:Play()
		second:Play()
		
		effects.Parent = root
		effects.Anchored = true
		effects.CFrame = root.CFrame + root.CFrame.LookVector * 4 + Vector3.new(0,-3,0)
		effects.Orientation = effects.Orientation + Vector3.new(0,0,-90)
		local rock = root.BoulderEffects.Rock
		
		wait(5)
		Debounce = false
	end
	game.Debris:AddItem(effects)
	effects = game.ReplicatedStorage.BoulderFX:WaitForChild("BoulderEffects"):Clone()

should be orientated like this when cloned:
image

video of issue:
https://streamable.com/ckfujl

You should multiply the final cframe by CFrame.Angles(0,math.pi/2,0). This should rotate it by 90 degrees on the Y axis. But, this might be the wrong axis, so try it on the X and Z as well.

changed it to -
effects.CFrame = root.CFrame + root.CFrame.LookVector * 4 + Vector3.new(0,-3,0) * CFrame.Angles(0,math.pi/2,0)

i’m assuming you mean just having root.CFrame * CFrame.Angles(0,math.pi/2,0)?

lookvector is so that the parts are positioned infront of the character (i’m sure you already know this) and the vector3.new is to position the cylinder near feet.

new to scripting and very new to cframe

Try this :

effects.CFrame = CFrame.new(root.CFrame + root.CFrame.LookVector * 4 + Vector3.new(0,-3,0)) * CFrame.Angles(0, 0, math.rad(90))

recieved error:

Players.VNOWZ.Backpack.SlingShot.DetectBoulderThrow:45: invalid argument #1 to ‘new’ (Vector3 expected, got CFrame)

Ok sorry, try this

effects.CFrame = root.CFrame + root.CFrame.LookVector * 4 + Vector3.new(0,-3,0) * CFrame.Angles(0, 0, math.rad(90))

same error
Players.VNOWZ.Backpack.SlingShot.DetectBoulderThrow:45: invalid argument #1 (CFrame expected, got Vector3)

bump

charrrrrrrrrrrrrrrrrrrrrrrrrrrr

bump

charrrrrrrrrrrrrrrrrrrrrrrrrrrr