I want to know on how to prevent your character from being you. Like in the murder games, but I'm not into making murder games. So, I got this model of a hat. I want it to be the default hat of everyone who joins my place. If possible, also the clothing. I just want to know the things I have to do. I want to figure out and do it myself. Please help me. A basic script would also help.
Well what I did is make a localscript and put it inside the StarterGui because that way the script will automatically run each time the player respawns.
--To modify the player, you may use the following code game.Players.LocalPlayer.Character.Shirt --or whatever you want to access inside the Character
To give everyone a hat, you would want to clone it into the character. What I did in my script was have a model in the workspace where I stored all the things I want to clone over to the player.
I also used the following code to remove some of the unwanted contents the player spawns with
for a,c in pairs(game.Players.LocalPlayer.Character:GetChildren()) do --Make a list of all the things inside the LocalPlayer's Character. "a" is the index value and "c" is the actual element. if (c.className == "Hat") or (c.className == "CharacterMesh") then c:Destroy() --Get's rid of the hat or charactermesh end
Here is an article on pairs loop if needed.
Hope you figure it out.