So I want to make it if you have this int value you can’t click on the NPC. However, it says in the output that the player does not have the value “Quest” which is true and the rest of the script doesn’t run. I want to make it where if you did have the value u cant click on the NPC but if u don’t u can.
You need to make sure that you have the actual logic inside the if statement:
if player:FindFirstChild("Quest") then -- This means we found the quest object so we will continue whatevers in the if statement
-- do whatever logic here
end
or make it return (which stops the function) if the quest value doesn’t exist (similar to what @dollychun suggested but making sure to stop the function if its false)
if not player:FindFirstChild("Quest") then return end -- This means the quest object wasnt found and therefore the rest of the thread won't continue.