Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Anything that can record a player's movements?

Asked by
Zerio920 285 Moderation Voter
10 years ago

Is there any service or event I can use that can record what actions a player does, like jumping, turning left, moving up, etc.?

1 answer

Log in to vote
3
Answered by
Mr_Octree 101
10 years ago

Perhaps. You could make a value that is increased every time a player jumps; for example

local player = game:GetService("Players").LocalPlayer
local char = player.Character
local jumped = 0
local jumpval = Instance.new("NumberValue",script)
jumpval.Name = "JumpValue"
print(jumped)

while true do wait(.1)
    if char.Humanoid.Jump == true then
        wait(1)
        jumped = jumped+1
        jumpval.Value = jumped
    end
end



For moving, you could record the changes in the position of the character like

A = char.Torso.Position

char.Torso.Changed:connect(function()
B= A-char.Torso.Position --Edited; typo :P
end)

Then, of course, you could insert the value of B into a Vector Value.

Hope this helps!

0
+1. Great answer. Spongocardo 1991 — 10y
Ad

Answer this question