So this if then statement is supposed to detect a certain value. However, I want it to do something else when the value changes.
local Hit = script:waitforchild("Random")
while wait() do
if Hit.Value == true then
print('Hi')
end
if Hit.Value == false then
print('Goodbye')
end
end
I want the script to do something else once the value changes. How would I make the script do this? Can someone please help me?

1 comment
It is suppost to be WaitForChild. Caps do matter in Lua.