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: Client-side custom movement

Previous Thread :: Next Thread 
Modoveex is not online. Modoveex
Joined: 21 Mar 2009
Total Posts: 8057
17 Sep 2015 01:07 PM
I'm working on a game with FilteringEnabled and I can't seem to get custom movement working. The humanoid is immovable for the client and changing it so the movement is handled server-side would cause huge latency issues. Is there any way to make custom movement for characters with FilteringEnabled on, client-side?
Report Abuse
Scripth is not online. Scripth
Joined: 23 Jun 2013
Total Posts: 1724
17 Sep 2015 01:28 PM
use bodymovers
bodygyro
bodyvelocity
etc..
Report Abuse
Modoveex is not online. Modoveex
Joined: 21 Mar 2009
Total Posts: 8057
17 Sep 2015 01:30 PM
Yeah, no, won't work.
I'm trying to move a server-side character (characters are server side) with a localscript - it doesn't work. Is there a way to move server-side humanoids with a client-side script?
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Sep 2015 01:32 PM
Uhh, that's what the control scripts do anyway? What exactly have you changed, is the real question.
Report Abuse
Scripth is not online. Scripth
Joined: 23 Jun 2013
Total Posts: 1724
17 Sep 2015 01:32 PM
You probably aren't using them properly because I have a filtering enabled game I've been working on with mobs, using body movers and they work perfectly. Only difference is that I load the mobs models to the client and not the server, which should have no effect on what you're trying to do.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Sep 2015 01:34 PM
Ding ding ding you win 10000 points

You can't replicate a :MoveTo() to the server if the model is not your Character
You can't use a physics Instance through the client if the PVInstance it belongs to is controlled by the server's state
Report Abuse
Modoveex is not online. Modoveex
Joined: 21 Mar 2009
Total Posts: 8057
17 Sep 2015 01:35 PM
I was actually not using ROBLOX' characters in my initial FE version AT ALL. I had client-made models with client-made parts and client-made humanoids that were client-controlled.
The problem was that physics didn't work. The physics ran maybe once per second even though the humanoid was moving and that caused it to walk through walls for up to a second before glitching into a random position and getting stuck and all.
So: humanoid physics don't work when the character is client-sided. Do bodygyros bodypositions etc work client-side and client-controlled?
Report Abuse
Modoveex is not online. Modoveex
Joined: 21 Mar 2009
Total Posts: 8057
17 Sep 2015 01:37 PM
@eLunate
right, so the :Move is being called on a Humanoid which is the Humanoid inside the game.Players.LocalPlayers.Character - it's not a :MoveTo.
I was using 'mobs' so to say before which wouldn't work because they were entirely client-side and they would ignore both client-side parts and server-side parts for the most part.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Sep 2015 01:38 PM
If everything is client-sided then physics should work just fine

However there is a small problem here, which is that Roblox just lets the Character state get synced as part of the Gamestate, which leaves you with some undefined behaviour.
Report Abuse
DermonDarble is not online. DermonDarble
Joined: 04 Jun 2015
Total Posts: 2576
17 Sep 2015 01:38 PM
You need a character for physics to work client-side
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Sep 2015 01:40 PM
:Move, :MoveTo, it shouldn't really matter so much to the difference (Even though they are certainly different)
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Sep 2015 01:41 PM
Ah, and that was the other thing I needed to get to.

I don't think you're supposed to give the Character from the client. Undefined behaviour.
Report Abuse
Modoveex is not online. Modoveex
Joined: 21 Mar 2009
Total Posts: 8057
17 Sep 2015 01:41 PM
So how should I go about the movement?
When I made the character and all the controls etc client-side it would result in real odd behavior. Floors, for instance, would work. Staircases would work for the most parts. Thin walls could be walked through - cube blocks could be walked into, then you would get teleported ontop of them halfway through.
Report Abuse
Modoveex is not online. Modoveex
Joined: 21 Mar 2009
Total Posts: 8057
17 Sep 2015 01:43 PM
Right now I make the character on the server through RemoteFunctions. The character is created etc. properly but the movement I try to impose on it has no effect (neither client-side nor server-side).
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Sep 2015 01:43 PM
It's part of the state. You're not getting any physics updates until the server says so, and in that time you have free roam to walk through any rigidbodies that you're not going to fall through
Report Abuse
Modoveex is not online. Modoveex
Joined: 21 Mar 2009
Total Posts: 8057
17 Sep 2015 01:45 PM
I figured as much. It's really odd because in my implementation the client could have handled it all itself because the character wasn't even known to the server. It wasn't even player.Character. It was just a 'mob', so to say. How do I program custom movement client-side on a FilteringEnabled game then? Do bodygyros, bodypositions etc function server-side (ie not move through rigibodies)?
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Sep 2015 01:49 PM
If you need to get custom movement, you want to change your Character through the server with a valid Character-ready Instance that is 'owned' by the server (If you're changing the Character), and then you want to change the default Control scripts in Player.PlayerScripts with your own ones. You can now do nearly whatever you want through the client, just short of changing the important bits of the Character that the server owns.
Report Abuse
Modoveex is not online. Modoveex
Joined: 21 Mar 2009
Total Posts: 8057
17 Sep 2015 01:52 PM
I'm not sure what you mean.
The character I'm currently using is made by the server and all I'm doing to edit it client-side is calling .Humanoid:MoveTo(p) - why should this not work? Is it because the LocalScript is not in Player.PlayerScripts but in ReplicatedFirst?
Report Abuse
Modoveex is not online. Modoveex
Joined: 21 Mar 2009
Total Posts: 8057
17 Sep 2015 01:58 PM
Also, is there a way to prevent the player from killing the Humanoid through ROBLOX' in-game menu?
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Sep 2015 02:05 PM
Prevent reset by changing the Humanoid name to something that isn't Humanoid

Somebody with more experience on custom characters come to the assistance of this guy? I use Roblox enough to know anything outside of theory.
Report Abuse
DermonDarble is not online. DermonDarble
Joined: 04 Jun 2015
Total Posts: 2576
17 Sep 2015 02:25 PM
iirc they fixed humanoid renaming

you can disable the dead state tho
Report Abuse
xolbStudios is not online. xolbStudios
Joined: 05 Nov 2009
Total Posts: 504
17 Sep 2015 02:26 PM
have you tried RemoteFunctions?
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
17 Sep 2015 02:27 PM
there's literally an API for assigning network owners now though, you don't need something to be your character to replicate it's physics lol

-=Robo=-
Report Abuse
Modoveex is not online. Modoveex
Joined: 21 Mar 2009
Total Posts: 8057
17 Sep 2015 02:29 PM
Instead of saying it's not needed, mind explaining how?
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
17 Sep 2015 02:32 PM
Modo, use this to set a client to own their character, then any and all physics applied locally will be replicated.
http://wiki.roblox.com/index.php?title=NetworkOwnership

-=Robo=-
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