I have a problem when changing a parts shape in a script

I ned hepl wit quik fix

why does it do this when I turn the part into a cylinder? and why did it scale down?

Screenshot (567)

why?
Screenshot (564)

local NewRootPart = Instance.new("Part")

NewRootPart.Size = Vector3.new(0.5,12,0.5)
NewRootPart.Rotation = Vector3.new(90, 0, 0) -- what am I doing wrong here?
NewRootPart.Position = Vector3.new(MyPlot.Position.X, MyPlot.Position.Y, MyPlot.Position.Z)
	
NewRootPart.Shape = "Cylinder"
NewRootPart.Anchored = true
NewRootPart.Parent = workspace
local NewRootPart = Instance.new("Part")

NewRootPart.Size = Vector3.new(12,0.5,0.5)
NewRootPart.Rotation = Vector3.new(90, 0, 0) -- what am I doing wrong here?
NewRootPart.Position = Vector3.new(MyPlot.Position.X, MyPlot.Position.Y, MyPlot.Position.Z)
	
NewRootPart.Shape = "Cylinder"
NewRootPart.Anchored = true
NewRootPart.Parent = workspace
1 Like

Thanks but now its sideways

Isnt tht wt u want? ignore

yeah I want it long but I don’t want it turn sideways

local NewRootPart = Instance.new("Part")

NewRootPart.Size = Vector3.new(12,0.5,0.5)
NewRootPart.Rotation = Vector3.new(0, 0, 0) -- what am I doing wrong here?
NewRootPart.Position = Vector3.new(MyPlot.Position.X, MyPlot.Position.Y, MyPlot.Position.Z)
	
NewRootPart.Shape = "Cylinder"
NewRootPart.Anchored = true
NewRootPart.Parent = workspace

Then dont mess with the rotation.

if i dont mess with the rotation, it still stays sideways

local NewRootPart = Instance.new("Part")

NewRootPart.Size = Vector3.new(12,0.5,0.5)
NewRootPart.Rotation = Vector3.new(0, 90, 0) -- what am I doing wrong here?
NewRootPart.Position = Vector3.new(MyPlot.Position.X, MyPlot.Position.Y, MyPlot.Position.Z)
	
NewRootPart.Shape = "Cylinder"
NewRootPart.Anchored = true
NewRootPart.Parent = workspace

its still not turning(also I have change the name of it)

local NewRootPart = Instance.new("Part")

NewRootPart.Size = Vector3.new(12,0.5,0.5)
NewRootPart.Position = Vector3.new(MyPlot.Position.X, MyPlot.Position.Y, MyPlot.Position.Z)
MyPlot.CFrame = MyPlot.CFrame * CFrame.Angles(math.rad(90),0, 0)
	
NewRootPart.Shape = "Cylinder"
NewRootPart.Anchored = true
NewRootPart.Parent = workspace

Set the part Orientation/Rotation to Vector3.new(0, 0, 90).

still not working but ill just forget about it, but thanks for the help

Hmm mqyb change z axis?

local NewRootPart = Instance.new("Part")

NewRootPart.Size = Vector3.new(12,0.5,0.5)
NewRootPart.Position = Vector3.new(MyPlot.Position.X, MyPlot.Position.Y, MyPlot.Position.Z)
MyPlot.CFrame = MyPlot.CFrame * CFrame.Angles(0, 0, math.rad(90))
	
NewRootPart.Shape = "Cylinder"
NewRootPart.Anchored = true
NewRootPart.Parent = workspace

So the reason why its not rotating is because the part is being followed by the mouse, so do you know how i can fix this?