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

What type of script will this go in?

Asked by 8 years ago

will this work in a locale script or just a script and also what will it go in ServerScriptService, Server Storage?

game.Players.PlayerAdded:connect(function(Player)
    Player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=129789661" 
end)
0
Use a regular script in ServerScriptService. Scripts don't work in ServerStorage and it would just be best to use a regular script for this. User#11440 120 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago

I would suggest this being a normal script. The local scripts only effect the client involved so If you want the rest of your server to see the new character appearances then use a normal script. The script should be in either Workspace or ServerScriptService.

0
Can i see all the code? I assume the part shown is only a section of it? What error are you getting? jordan0810 55 — 8y
0
thats is all the code :P I have never done anything with the CharacterAppearance in roblox, I don't get any errors but i look like my roblox guy micahsavary 5 — 8y
0
would I need to put more into the script? micahsavary 5 — 8y
0
I'm sorry but i'm not too sure how character appearance works but i'm sure there is someone who does that can help you more soon. However you should be able to find someone elses code that does this then modify it to your liking, or just read it and see whats done differently compared to yours jordan0810 55 — 8y
View all comments (3 more)
0
if i get a script to work ill accept your answer because u helped me :) micahsavary 5 — 8y
0
Thanks, sorry i can't help jordan0810 55 — 8y
0
its okay micahsavary 5 — 8y
Ad
Log in to vote
0
Answered by
Link150 1355 Badge of Merit Moderation Voter
8 years ago

This script would work both in a normal script and a localscript, but they would do so differently. To know why, we must understand how the server-client model works.

Normal scripts are serverside. This means they reside on the "server", a machine that is located in the Roblox Headquarters. The "server" is really just a very fast computer with a lot of hard disk space and memory that communicates with all the "clients".

Localscripts are clientside. This means they reside on the "client", a player's computer. The "clients" only communicate with the server. There is no peer-to-peer (direct client to client) communication going on. Anything that must be sent to a client from another client must first be sent to the server then sent back to the other player.

Normal scripts are executed on the server, and their results are sent back through the network to all of the clients connected to the game. This means if you change the property of a brick on a serverside script (for example, you change it's color to bright red), then the property will be replicated to all of the connected clients. In other words: all of the connected players will now see the brick become bright red.

Localscripts are executed on the client and their results are never sent back to the server. This means if you change the property of a brick on a clientside script (let's say you change it's color property to bright red again), then the property will NOT be replicated to the other connected clients. In other words: ONLY the player with the localscript will see the brick become bright red.

So what happens now is if you paste this script in a normal script, every player will see your character appearance change. If you paste it in a localscript, only the player with the script will see their appearance change.

Also, it's good you brought up the subject of ServerScriptService and ServerStorage. The ServerScriptService and ServerStorage services are both located on the server only. This means any Object located under them in the Roblox DataModel cannot be manipulated by localscripts. Say you put a brick in ServerStorage, you couldn't change it's color property through a localscript because the client is not aware of the contents of ServerStorage. So both services allow for a full hackerproof place to put your objects and scripts in. Only you can touch them.

The only difference between the ServerScriptService and the ServerStorage services is that ServerScriptService is intended to be a place to better organize and store scripts whereas ServerStorage is not only limited to scripts. I.E: you could place bricks, meshes, sounds, even scripts if you like; and all that fancy stuff.

So the best answer would be to put it either in StarterPlayer.StarterPlayerScripts or StarterPlayer.StarterCharacterScripts if you intend it to be a localscript OR into ServerStorage if you intend it to be a normal script.

Answer this question