I want to make it is like one person has a knife, another a gun, etc. Kind of like Murder Mystery.
You can do a function that will start the game if there are enough player to play the game, from there you can call 2 different variables:
"murderer"
and "policeman"
, at both will be assigned a random player from the players connected to the server, after that you can create a StringValue and put as a value the variable got from the random player chose.
FOR THIS YOU CAN USE A STRINGVALUE STORED IN THE PLAYER!
From that you can check what is the role given to the player and then giving him the tools:
function check() -- Your starting game code and random selection of the murderer and the policeman for _, player in pairs (game.Players:GetChildren()) do local team = player:FindFirstChild("Team") if team.Value == "murderer" then game.Lighting.YourMurdererTool:().Parent = player.Backpack elseif team.Value == "policeman" then game.Lighting.YourPolicemanTool:Clone().Parent = player.Backpack else print("Nothing for you, innocent =)!") end end end
First off, why'd you put "certain"? In Murder Mystery, the roles are given to random people. Not specific people. Also, this isn't a "we do it for you" site.
Tips to get started:
you'll have to define both innocent and murderer. Also the player, not so hard really.
tool = game.Lighting.Tool if player == innocent then print("nothing for you") elseif player == murderer then tool.Parent = murderer.BackPack end