-
What do you want to achieve? I’m trying to make a Locked Door system
-
What is the issue? I get the error ‘Workspace.Model.Part.Script:2: attempt to index boolean with ‘Value’’
-
What solutions have you tried so far? Devforum posts, but those all used BoolValues when I’m using a StringValue.
while wait() do
if script.Parent.Locked.Value == "not" then
script.Parent.BrickColor = BrickColor.new("Really red")
script.Parent.SurfaceGui.TextLabel.Text = "Lock"
elseif script.Parent.Locked.Value == "is" then
script.Parent.BrickColor = BrickColor.new("Bright green")
script.Parent.SurfaceGui.TextLabel.Text = "Unlock"
end
end
I’m not understanding how ‘Locked’ (A string Value) is being read as a Boolean. Maybe it’s not and I’m just confused, but either way, I’m unsure how to fix this.