So I was trying to make a murderer game but I need help... Do you think you can help?
Asked by
5 years ago Edited 5 years ago
So i was using a code made by HowToRoblox and tried to modified it here's the code that I modified
I have added a BoolValue named it Ingame
This script is in the ServerScriptService
There's no errors in this script but I don't understand what I did wrong sorry --edited
01 | local killerWeapon = game.ServerStorage.ClassicSword |
03 | local plrs = game.Players |
07 | local Ingame = game.ReplicatedStorage.InGame |
09 | while wait(Ingame.value = = true ) do |
11 | local chosen = plrs:GetChildren() [ math.random( 1 , #plrs:GetChildren()) ] |
13 | chosen.PlayerGui.Picker.Background.RoleGiven.Text = "Murder" |
14 | chosen.PlayerGui.Picker.Background.RoleGiven.TextColor 3 = Color 3. fromRGB( 0 , 0 , 0 ) |
16 | chosen.PlayerGui.Picker.Background.Visible = true |
18 | killerWeapon:Clone().Parent = chosen.Backpack |
21 | for i, plr in pairs (plrs:GetChildren()) do |
25 | table.insert(survivors, plr) |
27 | plr.PlayerGui.Picker.Background.RoleGiven.Text = "Survivor" |
28 | plr.PlayerGui.Picker.Background.RoleGiven.TextColor 3 = Color 3. fromRGB( 0 , 200 , 0 ) |
30 | plr.PlayerGui.Picker.Background.Visible = true |
Do you guys think you can fix what I have done wrong?