Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

PlayingGame is not a valid member of Model?

Hey, when i run.

local funMod = require(game.ServerScriptService.FunctionModScript) local gameOver = true local gameTime = 10 local lobbySpawn = game.Workspace.LobbyModel.SpawnLocation local gameSpawn = game.Workspace.GameModel.GameSpawn

game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character)

	local isPlaying = Instance.new("BoolValue", character)
	isPlaying.Name = "playingGame"
	isPlaying.Value = false
	
	while wait(1)do
		if gameOver then
			gameOver = funMod.WaitForGame(gameOver)
		else
			if gameTime ~= 0 then
				if character.PlayingGame.Value == false then
					character.PlayingGame.Value = true
					character.HumanoidRootPart.CFrame = gameSpawn.CFrame + Vector3.new(0,5,0)
				end 
				print("Game Time Remaining "..tostring(gameTime))
				gameTime = gameTime - 1
			else
				if character.PlayingGame.Value == true then
					character.PlayingGame.Value = false
					character.HumanoidRootPart.CFrame = lobbySpawn.CFrame + Vector3.new(0,5,0)
				end
				gameOver = true
				gameTime = 10
			end
		end
	end
end)

end)

Roblox says: PlayingGame is not a valid member of Model "Workspace.burnt_popcorn9" - Server - MainScript:19

Why is this?

1 answer

✓ Accepted answer

You named it "playingGame" not "PlayingGame"

This discussion is preserved as it was. New answers, comments, and votes are closed.