Hello, I want to make a game and i made scripts, There are no errors in output but script isn't working, can i get help please?
(Filtering Enabled)
function TimingDedect()
if game:GetService("Workspace")(game:GetService("ReplicatedStorage").Values:WaitForChild("ChoosenMap").Value) then
if game:GetService("Workspace")(game:GetService("ReplicatedStorage").Values:WaitForChild("ChoosenMap").Value):WaitForChild("WaitTime").Value <1 then
if game:GetService("ReplicatedStorage"):WaitForChild("Values").Restarting.Value == true then
end
end
---------------------------------------
function Timing()
if game:GetService("Workspace")(game:GetService("ReplicatedStorage").Values:WaitForChild("ChoosenMap").Value) then
while true do
wait(1)
if game:GetService("Players")(game:GetService("ReplicatedStorage"):WaitForChild("InfectedName").Value) then
if game:GetService("Players")(game:GetService("ReplicatedStorage"):WaitForChild("InfectedName").Value).Character.Humanoid.Health <1 then
InfectedDead()
game:GetService("ReplicatedStorage"):WaitForChild("Values").Restarting.Value = true
break
else
Values:WaitForChild("Message").Value = "Time left :" ..game:GetService("Workspace")(game:GetService("ReplicatedStorage").Values:WaitForChild("ChoosenMap").Value):WaitForChild("WaitTime").Value.."seconds"
game:GetService("Workspace")(game:GetService("ReplicatedStorage").Values:WaitForChild("ChoosenMap").Value):WaitForChild("WaitTime").Value = game:GetService("Workspace")(ChoosenMap):WaitForChild("WaitTime").Value -1
TimingDedect()
if game:GetService("ReplicatedStorage"):WaitForChild("Values").NumberPlayers.Value < 4 then
game:GetService("ReplicatedStorage"):WaitForChild("Values").Message.Value = "Needs 4 or more player in server!"
for i, Player in pairs(game:GetService("Players"):GetPlayers()) do
if Player then
if Player.Character then
Player.Character.Humanoid.Health = 0
end
end
end
end
end
end
end
end
end
end
end

2 comments
You should make variables of things instead of accessing things directly each time.
You wrapped your if statements in parentheses, and the script thought you tried to perform math on an object. They are math exclusive.