How do you make a detector for movement? I've been trying various methods, anyone have some pointers? Just a basic movement detector.
humanoid.Running:Connect(function(speed) if speed >0 then print('running') end end)
Assuming you mean movement for players, you can use the StateChanged
event of Humanoids.This works in either a local or a server script, but I'll show an example on the server-side:
game:GetService("Players").PlayerAdded:Connect(function(plr) local char = plr.Character or plr.CharacterAdded:Wait() local humanoid = char:WaitForChild("Humanoid") humanoid.StateChanged:Connect(function(old,new) if new == Enum.HumanoidStateType.Running then print("Movement begun") end end end)