All you have to do now is create the stats! For this tutorial I will be making the stats coins but you can do as many as you’d like! This would go after making the leaderstats instance local coins = Instance.new("NumberValue")Ĭoins. Local leaderstats = Instance.new("Folder") Players.PlayerAdded:Connect(function(player) local players = game:GetService("Players") Your script should look something like this by now. Leaderstats.Name = "leaderstats" - make sure the l is lowercase You can do this by doing this inside of the function local leaderstats = Instance.new("Folder") This would detect when the player joins the game! Next up, you would need to create an instance for when the player joins the game. You do that by doing players.PlayerAdded:Connect(function(player) - This allows players to change someones stats using strings instead of your player. Local players = game:GetService("Players")Īfter that, you would need to detect when a player joins the game. Example: player has red torso and pushes a button to change to green torso (that button also changes lor to green). The script works fine for the first time but when you change the colorvalue in playerstats, the body color doesnt change to that color. Once you have inserted a script, open up the script and remove print("Hello World") at the very top of the script! Once removed, start off by defining players by doing This script is to change a body color when the player is added to the game. Select on ServerScriptService and insert a script! Once you have done all that, you are set Here we go!
0 Comments
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |