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)
Extremely easy fix, you just made a small typo.
You said local Part = game.Workspace.Part.Orientation
(just do workspace.Part, it's a lot easier)
Just remove the Orientation off the end like so:
local mouse = game.Players.LocalPlayer:GetMouse() local Part = game.Workspace.Part 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)