generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How to disable player movement

Previous Thread :: Next Thread 
afif317 is not online. afif317
Joined: 28 Sep 2013
Total Posts: 84
17 Sep 2016 10:21 PM
So, basically, I made the player's humanoid move to a part, however, you can still move your character, and it interrupts the humanoid moving to it, and stops it. How would I fix this, but still let the humanoid move to the part (meaning Walkspeed wouldn't work)?


R$26 I'm broke rn
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
17 Sep 2016 10:23 PM
game:service'ContextActionService':UnbindAction("forwardMovement")
game:service'ContextActionService':UnbindAction("backwardMovement")
game:service'ContextActionService':UnbindAction("rightMovement")
game:service'ContextActionService':UnbindAction("leftMovement")
Report Abuse
afif317 is not online. afif317
Joined: 28 Sep 2013
Total Posts: 84
17 Sep 2016 10:24 PM
thx ill try that


R$26 I'm broke rn
Report Abuse
afif317 is not online. afif317
Joined: 28 Sep 2013
Total Posts: 84
17 Sep 2016 10:29 PM
that doesn't work. Does it have to be done in a localscript or something?


R$26 I'm broke rn
Report Abuse
afif317 is not online. afif317
Joined: 28 Sep 2013
Total Posts: 84
17 Sep 2016 10:31 PM
nevermind figured out how to fix it its simply game:service is depreciated i use game:GetService instead


R$26 I'm broke rn
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
17 Sep 2016 10:33 PM
It has to be used from a LocalScript; and it does work, it just used a deprecated method.
Report Abuse
afif317 is not online. afif317
Joined: 28 Sep 2013
Total Posts: 84
17 Sep 2016 10:34 PM
weird for me doesnt have to be done frm a localscript in studio maybe it does in real game also no it doesnt work even roblox says to use GetService instead ty tho


R$26 I'm broke rn
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
17 Sep 2016 10:36 PM
@afif

1. It won't work in a real game, only studio.2
2. IT DOES WORK! There is a difference between broken and deprecated. Broken = non-working. Deprecated = non recommended.
Report Abuse
afif317 is not online. afif317
Joined: 28 Sep 2013
Total Posts: 84
17 Sep 2016 10:37 PM
OH Thank you sir. So the door touched script would have to make it enable an event, and when that event is triggered, it will activate my localscript for it then, Mk. Also when I rebind, it says that the third argument is missing. Help?


R$26 I'm broke rn
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
17 Sep 2016 10:41 PM
@afif

To rebind, you do this from a local-script.

game.Players.LocalPlayer.PlayerScripts.ContolScript.Enabled = false
game.Players.LocalPlayer.PlayerScripts.ContolScript.Enabled = true
Report Abuse
afif317 is not online. afif317
Joined: 28 Sep 2013
Total Posts: 84
17 Sep 2016 10:42 PM
Mk.


R$26 I'm broke rn
Report Abuse
afif317 is not online. afif317
Joined: 28 Sep 2013
Total Posts: 84
17 Sep 2016 10:44 PM
@IndustrialOrc

Thanks for the help, I'll try it out and I'll tell you if it worked or not I wish I could give a small sum but I'm broke rn

My ROBUX:


R$26 I'm broke rn
Report Abuse
afif317 is not online. afif317
Joined: 28 Sep 2013
Total Posts: 84
17 Sep 2016 10:46 PM
so im using that, but it wont disable the movement, weird, I can still move in studio, haven't tried it in real game, can you move in studio?


R$26 I'm broke rn
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
17 Sep 2016 10:46 PM
It's fine, I just forum here to help ^.^
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
17 Sep 2016 10:47 PM
@afif

Add this before disabling

local a={"right",'left',"forward",'backward'}
for i,v in next,a do
repeat wait() until game:service'ContextActionService':GetBoundActionInfo(v.."Movement"
end

backward might be backwards
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
17 Sep 2016 10:48 PM
########################################################################################################################################################################################
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
17 Sep 2016 10:49 PM
local a={"right",'left',"forward",'backward'}
for i,v in next,a do
repeat wait() until game:service'ContextActionService':GetBoundActionInfo(v.."Movement")
end
Report Abuse
afif317 is not online. afif317
Joined: 28 Sep 2013
Total Posts: 84
17 Sep 2016 10:50 PM
Thanks SO much, it worked! I REALLY appreciate the help man.


R$26 I'm broke rn
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
17 Sep 2016 10:55 PM
no problem
Report Abuse
afif317 is not online. afif317
Joined: 28 Sep 2013
Total Posts: 84
17 Sep 2016 11:01 PM
Im REALLY sorry that I keep bugging you,
but heres an error Im getting
ContolScript is not a valid member of PlayerScripts


R$26 I'm broke rn
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
17 Sep 2016 11:02 PM
change it to ControlScript
that was a grammar error lol
Report Abuse
afif317 is not online. afif317
Joined: 28 Sep 2013
Total Posts: 84
17 Sep 2016 11:03 PM
oh hahaha mk thx


R$26 I'm broke rn
Report Abuse
afif317 is not online. afif317
Joined: 28 Sep 2013
Total Posts: 84
17 Sep 2016 11:16 PM
Ugh not again...
Um, even after adding the enabled = false enabled = true,
it still says Argument 3 nil or missing from
game:service'ContextActionService':BindAction("forwardMovement")



R$26 I'm broke rn
Report Abuse
IndustrialOrc is not online. IndustrialOrc
Joined: 10 Sep 2016
Total Posts: 327
17 Sep 2016 11:19 PM
You shouldn't be using BindAction, use only the code I gave.
Report Abuse
afif317 is not online. afif317
Joined: 28 Sep 2013
Total Posts: 84
17 Sep 2016 11:24 PM
Oh Mk. Oh wait, we ran into another problem =/

Now we can't move after we walk into the door, for 2 seconds, and then we can, which is great. BUT now it isn't walking to the part after we cant move for some reason


R$26 I'm broke rn
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image