Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why doesn't CharacterAutoLoads replicate to the client?

Asked by 9 years ago

So here's my dilemma.

My game by default has game.Players.CharacterAutoLoads set to false so that players don't spawn before the game loads external data (via httpservice).

When the data is loaded, game.Players.CharacterAutoLoads is set to true, allowing NEW players who join the server to spawn.

However, existing players have a script that waits until game.Players.CharacterAutoLoads is true to remove a Loading GUI, thus allowing the player to move around.

The problem is, the client doesn't see that game.Players.CharacterAutoLoads is now set to true (I tested it in a studio server.)

Play solo works fine (as expected), but is there a specific reason why game.Players.CharacterAutoLoads doesn't replicate? Are they working on fixing this? Just some input/ideas from anyone who has had this problem or would like to help me out would be appreciated.

Thanks

1 answer

Log in to vote
0
Answered by
Reselim 35
9 years ago

To do this, I'd suggest using events to fire to the client.

Make sure the event is in ReplicatedStorage or ReplicatedFirst.

On client:

event.OnClientEvent:connect(function()
    -- Code here
end)

On server:

--blahblahblah
game.Players.CharacterAutoLoads = true
event:FireAllClients()
0
I know I can do that, I just was wondering if anyone knew why ROBLOX doens't allow replication of that value to the client as well. Verbero 0 — 9y
0
Hm. I mean, the client may be able to modify that value, and end up breaking the game. Reselim 35 — 9y
Ad

Answer this question