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

01local player = game:GetService("Players").LocalPlayer
02local char = player.Character
03local jumped = 0
04local jumpval = Instance.new("NumberValue",script)
05jumpval.Name = "JumpValue"
06print(jumped)
07 
08while true do wait(.1)
09    if char.Humanoid.Jump == true then
10        wait(1)
11        jumped = jumped+1
12        jumpval.Value = jumped
13    end
14end

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

1A = char.Torso.Position
2 
3char.Torso.Changed:connect(function()
4B= A-char.Torso.Position --Edited; typo :P
5end)

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