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: Remove specific player's control of their character?

Previous Thread :: Next Thread 
iJava is not online. iJava
Joined: 06 Mar 2011
Total Posts: 29914
08 Apr 2015 11:44 PM
On the wiki I found a function to remove control and another of all the characters in game, but how can I make it specific to a certain character in a serverscript? This is the code found on the wiki

local controllers = {}
function removeControl()
for _, controller in pairs(game:GetService("ControllerService"):GetChildren()) do
controller.Parent = nil
table.insert(controllers, controller)
end
end
function resumeControl()
for _, controller in pairs(controllers) do
controller.Parent = game:GetService("ControllerService")
end
controllers = {}
end

I want to be able to call the functions like
removeControl(game.Players.iJava) and resumeControl(game.Players.iJava), how can I do this? Thanks

-Widths
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
08 Apr 2015 11:46 PM
You don't, not without RemoteFunctions/RemoteEvents at least.
Report Abuse
iJava is not online. iJava
Joined: 06 Mar 2011
Total Posts: 29914
08 Apr 2015 11:48 PM
There's no method at all?
I just want the player to be unable to move temporarily


-Widths
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
08 Apr 2015 11:50 PM
The ControllerService can only be accessed per client (which is pretty obvious) so if you want to "remove control" of another player, you can't because their controller does not exist to you or the server.

The best way to solve this is using a RemoteFunction/RemoteEvent and tell the client specifically to do it themselves.
Report Abuse
iJava is not online. iJava
Joined: 06 Mar 2011
Total Posts: 29914
08 Apr 2015 11:51 PM
Ah I see, thanks


-Widths
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