I want to make the player spin horizontally while moving forward. Like so…
For some reason the player keeps getting flung all over the place or isn’t in the right orientation.
I’ve tried using Body Movers which worked for the spinning but I don’t know how to tilt the player horizontally while spinning. I used the orientation of the character but it doesn’t do what I want it to.
local UIS = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local character = player.Character
local hmrp = character:WaitForChild("HumanoidRootPart")
local hum = character:WaitForChild("Humanoid")
local function spin(input, gpe)
if gpe then
return
end
if input.KeyCode == Enum.KeyCode.E then
--while wait() do
--hmrp.CFrame = hmrp.CFrame * CFrame.Angles(0,.5,0)
--hmrp.Orientation = hmrp.Orientation + Vector3.new(90,0,0)
hmrp.CFrame = hmrp.CFrame*CFrame.new(0, 0, -3) * CFrame.Angles(90,0,0)
local BodyAngularVelocity = Instance.new("BodyAngularVelocity", hmrp)
BodyAngularVelocity.AngularVelocity = Vector3.new(0,10,0)
local BV = Instance.new("BodyVelocity", hmrp)
BV.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
BV.Velocity = hmrp.CFrame.lookVector * 120
hum.PlatformStand = true
--end
end
end
UIS.InputBegan:Connect(spin)