I want to have a script to get the Y of the orientation of a part, but I do not know how to do it the right way. How could I achieve this?
1 Like
Use the Y property of its orientation. For example:
part.Orientation.Y
You can also do this with X and Z coordinates too.
1 Like
So I am making a jump script and when I use moveTo for it and I try to get the Y Orientation, it doesn’t seem to work.
here is the script:
local Model = script.Parent
local humanoid = Model.Humanoid
local HRP = Model:FindFirstChild("HumanoidRootPart")
humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
local Controls = require(game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule")):GetControls()---GetControls
Controls:Disable()
humanoid.Running:Connect(function(speed)
if speed > 0 then
humanoid:Move(Vector3.new(HRP.Orientation.X, HRP.Orientation.Y, -0.7), true)
end
end)
task.wait(0.6)
Controls:Enable()
end)