I am working on a survival plate based game (inspired by horrific housing and Plates of fate) and I found a tutorial that helps me with finding a script. I have 2 issues with this script. The first one is that the status.value isn’t updating the status gui. The second issue is that it highlighted in red the for i, v in pairs (Folder:GetChildren()) do. I am providing both the tutorial and the script. If you need anything else to help please contact. Thanks! (p.s. ignore the fact the spaces are off and its the code didnt merge into one the devforum fonting thingy isnt rlly working well.
local GameData = game.ReplicatedStorage.GameData
local Assets = game.ServerStorage.Assets
local Pillars = game.Workspace.Pillarslocal Status = GameData.Status
local Settings = {
Intermission = 10,
PlayersNeeded = 1,
TimeBetweenEvents = 5,
RoundInProgress = GameData.RoundinProgress.Value
}local function CalculatePlayers()
local NumberOfPlayers = game.Players:GetPlayers()
return NumberOfPlayers
endwhile wait() do
if CalculatePlayers() >= Settings.PlayersNeeded then
for i,v in pairs(Folder:GetChildren()) do
if v then
v:Destroy()
end
end
local PlayersInGame = {}
– The game actually starts –
for i = Settings.Intermission, 1, -1 do
Status.Value = "Intermission - "…i
wait(1)
end
Status.Value = “Game is getting ready to begin”wait(5)
local Plates = Assets.Plates:Clone()
Plates.Parent = game.Workspace.Pillars
for keyvalue, player in pairs(game.Players:GetPlayers()) do
if player.Character:FindFirstChild("Humanoid") then
if player.Charracter.Humanoid.Health >= 1 then
table.insert(PlayersInGame, keyvalue, player)
for i,v in pairs(Plates:GetChildren()) do
if v.Settings.OwnerOfPlace == "None" and not player.Character:FindFirstChild("") then
v.Settings.OwnerOfPlate.Value = player.Name
player.Character.HumanoidRootPart.CFrame = v.CFrame * CFrame.new(0, 2, 0)
local PlateValue = Instance.new("ObjectValue")
PlateValue.Parent = player.Character
PlateValue.Value = v
PlateValue.Name = "PlateValue"
end
end
end
end
end
for i, v in pairs(Plates:GetChildren()) do
if v.Settings.OwnerOfPlates.Value == "None" then
v:Destroy()
end
end
else
-- The game doesn't have enough players--
Status.Value = "Need more players to begin"
end
end