hey. I have been working on my game for a while and i had an idea. in the beginning a text gui is talking to a player. Is there any way i can lock the players position while the message is going. The following Script is just a guess to show what i mean:
1 | game.Player.LocalPlayer.JoinedGame:connect( function (LockplrCords) |
2 | wait( 30 ) |
3 | game.Players.LocalPlayer:disconnect( function (LockplrCords) |
Forgive my noobiness, but can someone show me how to do this?
You could anchor the player in the position.
1 | for i, v in pairs (LocalPlayer.Character:GetChildren()) do -- get all of the items inside the player's character model |
2 | if v:IsA( "BasePart" ) and v.Anchored = = false do -- make sure the item is a part (not clothing or scripts) |
3 | v.Anchored = true -- anchor the item |
4 | end |
5 | end ) |
I wrote that with no testing but it should work. I have explained what each line does so that you get a breakdown if anything goes wrong.
Please accept my answer if I helped!