The Basic Element of A simulator game (Part 1)

Hey! Everyone, I’m Icy and today I’m going to be showing the basic element of a simulator
So without further todo lets get straight into it :slight_smile:

  1. First We need data to store or points or data. go to serverscriptservice and create a script, name the script leaderstats
local function PlayerJoined(player)
	local leaderstats = Instance.new("Folder", player)
	leaderstats.Name = "leaderstats"
	
	local kills = Instance.new("IntValue", leaderstats)
	kills.Name = "Points"
	kills.Value = 0
	
	local deaths = Instance.new("IntValue", leaderstats)
	deaths.Name = "Money"
	deaths.Value = 0
end

game.Players.PlayerAdded:Connect(PlayerJoined)
  1. Next We need our Points to go up
    go to the toolbox on the top left hand corner and click it!
  • next search “Weight” in the search bar
  • You can use any model you would like
  • MAKE SURE TO DELETE THE SCRIPTS INSIDE THE WEIGHT
    image
  1. Next We need a RemoteEvent
  • Click the plus sign in ReplicatedStorage and click “RemoteEvent”
  • Next Name it “AddPoints”
    image
    image
    image
  1. create a LocalScript in the “Weight” that you selected
    image

  2. Type the following in your local script…

script.Parent.Activated:Connect(function()
	game.ReplicatedStorage.AddPoints:FireServer()
	script.Parent.Enabled = false
	wait(1)
	script.Parent.Enabled = true
end)
  1. Now that we Connected or AddPoints Event we need to Add Points to the leaderstats
    type the following…
game.ReplicatedStorage.AddPoints.OnServerEvent:Connect(function(player)
	player.leaderstats.Points.Value = player.leaderstats.Points.Value + 1
end)

Conclusion

You have complete part one of my simulator tutorial
I will post a link to part 2 in the future
but for now ill see you all later
bye :slight_smile:

8 Likes

In the part 2 try to do a data store because when a player leaves the values will don’t save

2 Likes

Ok thanks for the feedback i probably will do that in the future

3 Likes

This will help me make a simulator! Great tutorial! I cant wait to make my own simualtor :slightly_smiling_face:

3 Likes