This line of code is not working for me. And i don't really know why. What i'm trying to do is to change a bool value with another bool value and i'm finding the bool value with a string value. I checked that i have done right and finding the values so i don't think that's an error. However it gives me this error:
"attempt to index a nil value"
game.Workspace.Values.Voting.Result.Survive.Value=game.Lighting:FindFirstChild(game.Workspace.Values.Voting.Result.Value):FindFirstChild("survival").Value
EDIT:
I solved this! In another script i swithced the parent of the model to workspace, to make it work i need to search the model in the workspace and not in the lighting. game.Workspace.Values.Voting.Result.Survive.Value=game.Workspace:FindFirstChild(game.Workspace.Values.Voting.Result.Value):FindFirstChild("survival").Value
I solved this now!
What is the other bool value location? And the name..
local a =game.Lighting:FindFirstChild(game.Workspace.Values.Voting.Result.Value) local b = a:FindFirstChild("survival").Value game.Workspace.Values.Voting.Result.Survive.Value = b
Tell me if this gives you the wrong outcome, or errors.