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

How can I make the changes of a local script global without RemoteEvents?

Asked by
Jo_Bot 67
6 years ago

I made this huge local script for my custom character, and it makes the character able to be customized. When I test it, it only appears for 1 player, since FE is enabled. What could I do besides using Remote Events to make it visible for everyone? (No, I'm not going to disable FE)

001wait(1)
002local plr = script.Parent.Parent
003 
004local mouse = plr:GetMouse()
005 
006local chr = plr.Character
007local skin = plr.PlayerGui.Customize.Frame.SkinTone
008local play = plr.PlayerGui.Customize.Frame.Play
009local gender = plr.PlayerGui.Customize.Frame.Gender
010local hair = plr.PlayerGui.Customize.Frame.Hair
011local frame = plr.PlayerGui.Customize.Frame
012local editing = play.Editing
013editing.Parent = chr
014editing.Value = true
015--skintone
View all 162 lines...

3 answers

Log in to vote
7
Answered by 6 years ago

You need to do that on the server to replicate changes to other clients. There is not a hacky workaround to using a remote event; you just need to use a remote event. Have the client fire to the server requesting the customization choices desired; then apply all property changes on the server.

0
okay, so have each option (Skin tone, Gender, Hair on/off, and Hair color) a parameter of the Remote Event sent from the local script, then have the server script use those parameters to change the player? (And the first parameter is the player, of course) Jo_Bot 67 — 6y
0
Yes; the listener on the server will always be passed the player responsible for the client event as the first parameter. You would fire with a parameter for each property change, looking somewhat like this: RemoteEvent:FireServer(skinColor, hairModelName, hairColor) assuming those variables are the correct values as assigned by gui selections. Because the player is passed as the first parameter t InfinityDesign 280 — 6y
Ad
Log in to vote
3
Answered by 6 years ago

You have two choices, use remotes or disable FE. Just serverscripts alone (referring to first answer) won't work, due to this modifying a specific player/being on the player GUI.

0
You're incorrect there. You need to handle property assignment on the server to replicate changes to all clients. Any changes made on the client will not replicate to other clients and disabling FE should not even be an option you consider. InfinityDesign 280 — 6y
Log in to vote
0
Answered by 6 years ago

remote events

Answer this question