sounds weird but what i mean is
player.MovingDirection.Magnitude
or however you did it but with GetPropertyChangedSignal()
sounds weird but what i mean is
player.MovingDirection.Magnitude
or however you did it but with GetPropertyChangedSignal()
Can you please be more specific. I’m really confused what your trying to ask.
telling the magnitude of the player with getpropertychangedsignal so you can tell when it changes
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(function()
print(Humanoid.MoveDirection.Magnitude)
end)
It’s MoveDirection
not MovingDirection
.
If this is a server script, it will not work. Turn it into a local script or change the RunContext
of it to Client
.
i am a failure LOL thanks lemme test.
DAMNIT any other way to do it on the server? i really REALLY need it.
Let me see if I can make it server-sided.
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(function()
print(Humanoid.MoveDirection.Magnitude)
end)
end)
end)
ohhhhh I thought you meant that magnitude wouldn’t work. i have a for loop.
ok uhhhh
Show me the code, shouldn’t be happening.
nevermind i am stupid i saw what you sent lemme fix it
just prints 0 and 1… is that normal? i am trying to tell since i want to tell the difference between an older magnitude and the new one.
It is a normal response, if you want to record the differences add the responses to a table and get the difference.
well how would i get the player’s velocity?
heres how you get it in a script:
local velocity = chr.PrimaryPart.AssemblyLinearVelocity
Or, just for clarity,
local playerVelocity = character.HumanoidRootPart.AssemblyLinearVelocity