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
local killerWeapon = game.ServerStorage.ClassicSword
local plrs = game.Players
local survivors = {}
local Ingame = game.ReplicatedStorage.InGame
while wait(Ingame.value == true) do
local chosen = plrs:GetChildren()[math.random(1, #plrs:GetChildren())]
chosen.PlayerGui.Picker.Background.RoleGiven.Text = "Murder"
chosen.PlayerGui.Picker.Background.RoleGiven.TextColor3 = Color3.fromRGB(0, 0, 0)
chosen.PlayerGui.Picker.Background.Visible = true
killerWeapon:Clone().Parent = chosen.Backpack
for i, plr in pairs(plrs:GetChildren()) do
if plr ~= chosen then
table.insert(survivors, plr)
plr.PlayerGui.Picker.Background.RoleGiven.Text = "Survivor"
plr.PlayerGui.Picker.Background.RoleGiven.TextColor3 = Color3.fromRGB(0, 200, 0)
plr.PlayerGui.Picker.Background.Visible = true
wait()
end
end
end
Do you guys think you can fix what I have done wrong?

4 comments
ever heard of an output?
Yes.
What greatneil80 is saying is that what was the error. It is impossible to fix unless we know the error code
oh sorry