I got an error from this script saying " Orientation is not a valid member of Vector3"
How Can I fix this?
mouse = game.Players.LocalPlayer:GetMouse()
Part = game.Workspace.Part.Orientation
function onKeyDown( key )
if key == "d" then
while true do
Part.Orientation = Part.Orientation + Vector3.new(0,1,0)
if Part.Orientation == Vector3.new(0,45,0)
then break end
wait()
end
end
if key == "a" then
while true do
Part.Orientation = Part.Orientation + Vector3.new(0,-1,0)
if Part.Orientation == Vector3.new(0,-45,0)then
break
end
wait()
end
end
end
mouse.KeyDown:connect(onKeyDown)

1 comment
Don't use while true do, it will yield the entire script when it runs.