local startingmaterial = script.Parent.Material
wait(15)
local touchparts = script.Parent:GetTouchingParts()
for i,v in pairs(touchparts) do
if v:IsA("Part") and v.Name == "Wire" then
v.Volt.Changed:Connect(function()
if v.Volt.Value >= 1 then
script.Parent.Material = Enum.Material.Neon
wait(1)
script.Parent.Material = startingmaterial
end
end)
end
end
So the light checks if any wire is touching and in the wire there is an IntValue called volts and thats how much the wire is having, so the light should work for a particular number of volts and should work, the script I made dosen’t work, please tell how to fix it
The wire connected to light broke, it dosen’t turn blue after it gets current after removing light the wire works, does this mean wire works for wires only?