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

How to lock a players position to a certain point?

Asked by 6 years ago

I've tried using the wiki and youtube, but I assume you would use CFrame/Vector3 on the player's humanoid. If someone could tell me how to lock a players position when they have clicked an object so that lock can be toggled on and off that would be great.

0
what i would do is: workspace.greatneil80.Humanoid.WalkToPoint = workspace.Part That way I would always move to a specific part greatneil80 2647 — 6y
0
Using that says 'bad argument #3 to 'WalkToPoint' (Vector3 expected, got Object) Marty999 82 — 6y
0
Nevermind, fixed it by adding '.position' to after part Marty999 82 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

If you mean make somebody stuck at a certain point then here's a solution I guess.

01local player = game.Players.LocalPlayer
02local Character = player.Character
03local PartPosition = game.Workspace.Part.Position
04 
05local function testing(PartPosition)
06 
07    Character:MoveTo(game.Workspace.Part.Position)
08    Character.Humanoid.WalkSpeed = 0
09    Character.Humanoid.JumpPower = 0
10end
11 
12testing(PartPosition)
0
Doing this means the players walkspeed will be 0 so they cant reach the 'walkto' part Marty999 82 — 6y
0
What are you trying to achieve? casper123123123 357 — 6y
Ad

Answer this question