Why my character just fall like that

Here’s what happened.
https://gyazo.com/f7ac30538e1bf5b713c8dba882abd8dd

Here’s the script
local Player = game:GetService(“Players”).LocalPlayer or game.Players.PlayerAdded
local Charactere = Player.Character or Player.CharacterAdded:Wait()
local Mouse = Player:GetMouse()
local YCA = true
local UIS = game:GetService(“UserInputService”)
UIS.InputBegan:Connect(function(input,IsTyping)
if not IsTyping then
if input.KeyCode == Enum.KeyCode.F then
YCA = false
Charactere.HumanoidRootPart.Anchored = true
Charactere.HumanoidRootPart.CanCollide = false
while YCA == false do
wait()
Charactere.HumanoidRootPart.CFrame = CFrame.new(Charactere.HumanoidRootPart.Position , Mouse.Hit.p)
end
end
end
end)
UIS.InputEnded:Connect(function(input,IsTyping)
if not IsTyping then
if input.KeyCode == Enum.KeyCode.F then
YCA = true
Charactere.HumanoidRootPart.Anchored = false
Charactere.HumanoidRootPart.CanCollide = true
end
end
end)

1 Like

What you are exactly trying to do?

I want to make mouse aim skill kinda like this.

https://gyazo.com/575c5063450427a1355dae12a8197c33

I think it has to do with when the character move is played, that it basically shuts down and basically falls to the ground. Just like if you would fly and your face is towards the ground, you’d fall as well like that. Maybe set a max radius of the XYZ Axis?

set a max radius of the XYZ Axis? How can i do that? Can you tell me?

Oh you can see some tutorials on it

I’m not sure myself, since I ain’t that much of a scripter. But it should be possible to reset the humanoid to its original position.

I think it is because of the angle of which your character is at after leaving flight mode. This angle causes Roblox to assume that you are in a falling state and therefore drops your character like a brick. I could be wrong though. Try to go off of fly mode while being upright and see what happens.

Yeah that’s my guess as well. There should be a way to reset the players/humanoids position back to normal right? (If needed)

add this at the bottom

Charactere.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,false)
2 Likes

This should work

local Player = game:GetService(“Players”).LocalPlayer or game.Players.PlayerAdded
local Charactere = Player.Character or Player.CharacterAdded:Wait()
local Mouse = Player:GetMouse()
local YCA = true
local UIS = game:GetService(“UserInputService”)
UIS.InputBegan:Connect(function(input,IsTyping)
if not IsTyping then
if input.KeyCode == Enum.KeyCode.F then
YCA = false
Charactere.HumanoidRootPart.Anchored = true
Charactere.HumanoidRootPart.CanCollide = false
while YCA == false do
wait()
Charactere.HumanoidRootPart.CFrame = CFrame.new(Charactere.HumanoidRootPart.Position , Vector3.new(Mouse.Hit.p.X, Charactere.HumanoidRootPart.Position, Mouse.Hit.pZ))
end
end
end
end)
UIS.InputEnded:Connect(function(input,IsTyping)
if not IsTyping then
if input.KeyCode == Enum.KeyCode.F then
YCA = true
Charactere.HumanoidRootPart.Anchored = false
Charactere.HumanoidRootPart.CanCollide = true
end
end
end)
2 Likes

I don’t know why did you reply me lol.