Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 17 Jun 2016 02:20 PM |
If I store an IntValue, for example, in a character's humanoid, and then the player changes its value, will the server recognize that change?
|
|
|
| Report Abuse |
|
|
Goocolax
|
  |
| Joined: 14 Jun 2016 |
| Total Posts: 226 |
|
| |
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 17 Jun 2016 02:23 PM |
Ty I've always heard that the character falls in a strange realm of network ownership.
|
|
|
| Report Abuse |
|
|
Goocolax
|
  |
| Joined: 14 Jun 2016 |
| Total Posts: 226 |
|
|
| 17 Jun 2016 02:24 PM |
Well not really. A rule of thumb is that humanoid properties normally replicate, animations replicate, and thats about it. On top of that, if you were to block a character from moving with a wall on the client, he wouldn't move on the server. It's strange, what does and does not work, but that's it for ya. There might be more too that replicates that I'm not thinking of. I also think body movers replicate. |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 17 Jun 2016 02:26 PM |
So if humanoid properties replicate, doesn't that mean they can just change their health locally and it'll get replicated to the server?
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 17 Jun 2016 02:56 PM |
I would hope not.
If so, do I have to perform server-side checks to keep an eye on their health?
|
|
|
| Report Abuse |
|
|
Entelicon
|
  |
| Joined: 06 Nov 2012 |
| Total Posts: 1002 |
|
|
| 17 Jun 2016 02:57 PM |
Obvious answer would be no, but like you said Humanoids are different.
I'm curious now ._. |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 17 Jun 2016 03:05 PM |
| You can put BodyMovers inside characters and they should replicate. That's how I made my go-karts. |
|
|
| Report Abuse |
|
|
BanTech
|
  |
| Joined: 31 Dec 2015 |
| Total Posts: 886 |
|
|
| 17 Jun 2016 03:10 PM |
| Health doesn't replicate, unless you die on the client. |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 17 Jun 2016 03:11 PM |
So, hypothetically, could the client change their health to 0 and die of their own accord?
|
|
|
| Report Abuse |
|
|
BanTech
|
  |
| Joined: 31 Dec 2015 |
| Total Posts: 886 |
|
|
| 17 Jun 2016 03:12 PM |
| Interestingly, things like WalkSpeed do not replicate to the server, but they do actually affect the player's walkspeed. This is a bit of a weird one. |
|
|
| Report Abuse |
|
|
BanTech
|
  |
| Joined: 31 Dec 2015 |
| Total Posts: 886 |
|
|
| 17 Jun 2016 03:13 PM |
| And yes, but they could also press esc > R. |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 17 Jun 2016 03:15 PM |
Yeah, is there a way to disable that manual reset? I've heard of doing something like this:
#code local plr = game.Players.LocalPlayer repeat wait() until plr.Character and plr.Character:FindFirstChild("Humanoid") local hum = plr.Character['Humanoid'] hum.HealthChanged:connect(function(health) if health<= 0 then hum.Health = hum.MaxHealth plr.Character:MakeJoints() end end) But this is impractical because it would just give them full HP.
|
|
|
| Report Abuse |
|
|
BanTech
|
  |
| Joined: 31 Dec 2015 |
| Total Posts: 886 |
|
|
| 17 Jun 2016 03:18 PM |
| You'd probably have to keep a table of their last known health and if the health jumps to zero from an unreasonable distance, then run that bit of code. |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 17 Jun 2016 03:24 PM |
Fortunately for me I don't need to stop the player from resetting, but I wish there was an easier way.
That solution also wouldn't be effective for PvP games where the damage ranges anywhere from a couple to a few hundred points. :(
|
|
|
| Report Abuse |
|
|
|
| 17 Jun 2016 03:30 PM |
"Interestingly, things like WalkSpeed do not replicate to the server, but they do actually affect the player's walkspeed. This is a bit of a weird one." It's not weird at all. Local player physics are handled on the client. |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 17 Jun 2016 03:31 PM |
Even in FE? That seems to defeat the spirit of it all.
|
|
|
| Report Abuse |
|
|
|
| 17 Jun 2016 03:33 PM |
| I'm not really that knowledgeable where networking is concerned, but as far as I know it'd be a living hell if your character physics were handled on the server. |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 17 Jun 2016 03:35 PM |
I guess I don't know enough either
oh well, as long as people aren't changing their health around I guess I'm cool with it.
|
|
|
| Report Abuse |
|
|
|
| 17 Jun 2016 03:37 PM |
| Health won't replicate, humanoid properties won't replicate (actually some of them may do but no significant ones I know of that would affect gameplay), but local player physics _will_ replicate (e.g ROBLOX animations and the character moving around but not changes to Motor6Ds or the likes). |
|
|
| Report Abuse |
|
|