game.Players[Randomplayer].PlayerScripts.Bear.Value = true
In the output it shows…
Randomplayer is a variable which is set to a players name
Workspace.StartUp:80: attempt to call a Instance value
Please Help
LargeHotDogs13
game.Players[Randomplayer].PlayerScripts.Bear.Value = true
In the output it shows…
Randomplayer is a variable which is set to a players name
Workspace.StartUp:80: attempt to call a Instance value
Please Help
LargeHotDogs13
I don’t use values for players, so I’m not sure but try this
game.Players:FindFirstChild(Randomplayer).PlayerScripts.Bear.Value = true
That doesn’t call anything. You’ll have to provide the actual error site in order to get any help.
Click on the error in the output window and it’ll take you to the line in the script at which the error occurred.
This is the error that shows up.
Workspace.StartUp:80: attempt to index nil with ‘PlayerScripts’
FindFirstChild(Randomplayer)
Means this is nil.
So the problem isn’t on that line, can you show the full script?
Is this a Local Script or a Server Script? Because if this is a Server Script, Server Scripts cannot access PlayerScripts, since PlayerScripts is created by the client.
You should move your Bear Value to ReplicatedStorage, PlayerGui, or in StarterCharacterScripts, wherever server scripts can access the Value.