So I'm tryng to make a quest system, but when I got to a part which compares a bool value; the script keeps saying that it's false, while in reality, it's true. I was wondering if this is a bug or if there's an error in my script.
Here is the script:
local YBDavid = game.Workspace:WaitForChild("Young Boy David")
local T1 = script.Parent.Parent.Parent:FindFirstChild("Text1")
local T2 = script.Parent.Parent.Parent:FindFirstChild("Text2")
local Tv = game.ReplicatedStorage:FindFirstChild("Tv")
local Bv = game.ReplicatedStorage:FindFirstChild("Bv")
local QFolder = YBDavid:WaitForChild("Quests")
local A = QFolder:WaitForChild("Accepted")
local B = QFolder:WaitForChild("Beaten")
script.Parent.MouseClick:Connect(function()
print("Clicked")
print(A.Value)
if A.Value == true then
print("A = t")
B.Value = true
Bv.Value = T2
end
if A.Value == false then
print("A = f")
Tv.Value = script.Parent.Parent.Parent.Name..":"
Bv.Value = T1.Value
end
end)
Thank you for your time. --CaptainGalexyCreeper

1 comment
If the script says its false, then it is false. Problem is not in the script. Try setting the value manually in studio, by changing it in the property window. Note: if you change the A Value to true in the LocalScript, the server will not record it due to client/server filtering. You need to change this value on server.