Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

1 Is not a valid member of Player error in my minigame script. Whats wrong?

Asked by 5 years ago
Edited 5 years ago

Hello, I am having an error saying '1 is not a valid member of player' on line 107 I am very confused, as I don't see the number one anywhere. Here is my script:

001local timenow = time()
002script.start.Value = timenow
003local replicatedStorage = game.ReplicatedStorage
004local status = replicatedStorage:WaitForChild('MinigameStuff'):WaitForChild('Status')
005local maps = {replicatedStorage.Maps.Map1}
006print('There are ' .. #maps .. " maps")
007local timenoww = time()
008script.eend.Value = timenoww
009local relapsed = script.start.Value - script.eend.Value
010print('GameScript loaded in ' .. relapsed .. " seconds")
011script.start:Destroy()
012print('Removed value start')
013script.eend:Destroy()
014print('Removed value eend')
015local message = game.ReplicatedStorage:WaitForChild('MinigameStuff'):WaitForChild('Status')
View all 178 lines...

I am honestly confused, and I would like anyone to explain it to me. Anything would help. Thank you!

Edit: This script isn't done, so please don't point out any other errors unless they are or may be related to the problem

0
My real account is TheWorstOne_2. That probably won't help. altecountrt 0 — 5y
0
The thing is you already found the player. You don't need the [i] because it check if the player has the number i instead of checking if the player still exists PixelRankYT 20 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

The thing is you already found the player. You don't need the [i] because it check if the player has the number i instead of checking if the player still exists

Ad

Answer this question