while wait() do
function onTouched(hit)
local a = hit:FindFirstChild("Power")
if (a==nil)==false then
if (a.Value==nil)==false
then script.Parent.Power.Value=true
else script.Parent.Power.Value=false
end
end
end
end
script.Parent.touched:connect(onTouched)
This script doesn't work.
Basically in workspace there is a part which is supposed to be like redstone (except in Roblox), if this part contacts another part, it goes to see if it has a bool value called "Power", if it finds a bool value called power it will check it's value, if it's value is true, then the part's own power value will be put onto true, and transmit it to the next part. Please help.

1 comment
@RobloxianDav Also note that the while loop was pointless and infinite (so it'll stop your code there indefinitely), meaning that Line 13 couldn't run.