Rotation problem with SetPrimaryPartCFrame

Hi developers, i have a problem with my script, when i execute the script the rotation of the part doesnt works on the object, idk if its the CFrame or what but i need help

Video on Drive

Clone Script:

game.ReplicatedStorage.FireworkActivation.FireCrackerAct.OnServerEvent:Connect(function(Plr, HandleP, MechaP, PaloP, TallP, HandleCFrame)
	
	local FireCracker = game.ReplicatedStorage.FireworksModels.FireCracker:Clone()
	local Model = script.FireValue.Value.Handle
	
	if(script.FireValue.Value.Anchor.Value == true) then -- Anchor Function (Ignore)
		FireCracker.Tall.Anchored = true
	else
		FireCracker.Tall.Anchored = false
	end
	
	FireCracker.Parent = game.Workspace	-- Parent
	FireCracker:SetPrimaryPartCFrame(CFrame.new(HandleCFrame)) -- Firework position
	
end)

game.ReplicatedStorage.FireworkActivation.FireCrackerAnchor.OnServerEvent:Connect(function() -- Anchor Function (Ignore)
	if(script.FireValue.Value.Anchor.Value == false) then
		script.FireValue.Value.Anchor.Value = true
	else
		script.FireValue.Value.Anchor.Value = false
	end
end)
1 Like

Dunno if you solved this issue yet,

but im pretty sure the rotation isnt working because you arent giving a rotation value to the CFrame.new(vector3pos,vector3lookat). If you don’t give a vector3lookat value it defaults to 0,0,0

as im assuming HandleCFrame is a CFrame value then instead it should just be

FireCracker:SetPrimaryPartCFrame(HandleCFrame)
1 Like