I am making a status bar. Here is the script!

local ReplicatedStorge = game:GetService("ReplicatedStorage")

local ServerStorage = game:GetService("ServerStorage")

local MapsFolder = ServerStorage:WaitForChild("Maps")

local Status = ReplicatedStorge:WaitForChild("Status")

local GameLength = 450

-- Game loop

while true do

Status.Value = "Waiting for enough players"

repeat wait(1) until game.Players.NumPlayers >=6

Status.Value = "Intermission"

wait(30)

local plrs = {}

for i, player in pairs(game.Players:GetPlayers()) do if player then table.insert(plrs,player)

     end
 end

wait(2)

local AvalibleMaps = MapsFolder:GetChildren()

local ChosenMap = AvalibleMaps[math.random(1,#AvalibleMaps)]

Status.Value = ChosenMap.Name.. " Chosen"

local ClonedMap = ChosenMap:Clone() ClonedMap.Parent = workspace

local SpawnPoints = ClonedMap:FindFirstChild("SpawnPoints")

if not SpawnPoints then print("Spawnpoints not found!") --Could be an end?

 local AvailableSpawnPoints = SpawnPoints:GetChildren()

 for i, player in pairs(plrs) do
     if player then
         character = player.Character
          
     if character then

       character:FindFirstChild("HumanoidRootPart").CFrame = AvailableSpawnPoints[1].CFrame
       table.remove(AvailableSpawnPoints,1)

     else

        if not player then
           table.remove(plrs,i ) 

                end
            end
        end
    end
end

Status.Value = "Get ready to play"

wait(2)

end

end

Is there anything wrong?

This is the local script:

local Status = game:GetService("ReplicatedStorage"):WaitForChild("Status")

script.Parent.Text = Status.Value

Status:GetPropertyChangedSignal("Value"):Connect(function()

script.Parent.TextLabel.Text = Status.Value

end)

This is the output:

16:43:35.231 - Stack Begin 16:43:35.234 - Script 'ServerScriptService.LinkedLeaderboard', Line 11 - function onHumanoidDied 16:43:35.234 - Script 'ServerScriptService.LinkedLeaderboard', Line 28 16:43:35.235 - Stack End 16:43:41.040 - Gyro is not a valid member of LocalScript 16:43:41.040 - Stack Begin 16:43:41.041 - Script 'Players.merthjm.Backpack.Sniper.EpicEffect', Line 3 16:43:41.041 - Stack End 16:43:41.051 - Checkpoints is not a valid member of Workspace 16:43:41.052 - Stack Begin 16:43:41.054 - Script 'ServerScriptService.Checkpoint handler', Line 11 16:43:41.055 - Stack End 16:43:43.590 - ServerScriptService.LinkedLeaderboard:11: attempt to index nil with 'Value' 16:43:43.592 - Stack Begin 16:43:43.596 - Script 'ServerScriptService.LinkedLeaderboard', Line 11 - function onHumanoidDied 16:43:43.598 - Script 'ServerScriptService.LinkedLeaderboard', Line 28 16:43:43.599 - Stack End 16:43:51.072 - Checkpoints is not a valid member of Workspace 16:43:51.076 - Stack Begin 16:43:51.079 - Script 'ServerScriptService.Checkpoint handler', Line 11 16:43:51.081 - Stack End 16:43:51.096 - Gyro is not a valid member of LocalScript 16:43:51.097 - Stack Begin 16:43:51.097 - Script 'Players.merthjm.Backpack.Sniper.EpicEffect', Line 3 16:43:51.097 - Stack End 16:43:53.582 - ServerScriptService.LinkedLeaderboard:11: attempt to index nil with 'Value' 16:43:53.583 - Stack Begin 16:43:53.585 - Script 'ServerScriptService.LinkedLeaderboard', Line 11 - function onHumanoidDied 16:43:53.587 - Script 'ServerScriptService.LinkedLeaderboard', Line 28 16:43:53.590 - Stack End 16:44:01.130 - Checkpoints is not a valid member of Workspace 16:44:01.131 - Stack Begin 16:44:01.131 - Script 'ServerScriptService.Checkpoint handler', Line 11 16:44:01.131 - Stack End 16:44:01.132 - Gyro is not a valid member of LocalScript 16:44:01.132 - Stack Begin 16:44:01.132 - Script 'Players.merthjm.Backpack.Sniper.EpicEffect', Line 3 16:44:01.133 - Stack End 16:44:03.671 - ServerScriptService.LinkedLeaderboard:11: attempt to index nil with 'Value' 16:44:03.674 - Stack Begin 16:44:03.675 - Script 'ServerScriptService.LinkedLeaderboard', Line 11 - function onHumanoidDied 16:44:03.676 - Script 'ServerScriptService.LinkedLeaderboard', Line 28 16:44:03.679 - Stack End 16:44:06.447 - Disconnect from ::1|63335

Thanks!

7 comments

0

I am not sure why the format is like that. lol

0

P.S The lines could be messed up in here. Do not worry about the format!

0

When something is not a member of something else, that means the first thing is not a child of the second one.

0

So how do I fix it and what is "Gyro". Nothing in my script/map is named "Gyro".

0

Could you give me advise on what is wrong with my script?

0

as the output says, 'gyro' is in a local script. could you show us that pls?

0

This is my only local script: local Status = game:GetService("ReplicatedStorage"):WaitForChild("Status") script.Parent.Text = Status.Value Status:GetPropertyChangedSignal("Value"):Connect(function() view source 1 script.Parent.TextLabel.Text = Status.Value