This is not an issue, but why does this non loop looping and is this roblox studio bug or script issue?
Script:
script.Parent.Changed:Connect(function()
local touchparts = script.Parent:GetTouchingParts()
for i,v in pairs(touchparts) do
print(v.Name)
if v:IsA("Part") and v.Name == "Wire" then
v.Volt.Changed:Connect(function()
if v.Volt.Value >= 1 then
print(v.Volt.Value)
script.Parent.Material = Enum.Material.Neon
wait(1)
script.Parent.Material = startingmaterial
end
end)
end
end
end)
It printed 150 times, and the change function will be done manually, I mean I will change the position and its anchored to, but why is it running many times
Changed detects every property change except physics based ones like position, orientation, cframe, etc. Thus, it fires so many times. Also, why is there a nested Changed block?
Ay yo. There is no need to use the sort of language you are using. If you’re angry, go vent it out somewhere else, we don’t need to hear your complaints on a perfectly reasonable topic, or anywhere else on the forum. If you can’t handle “idiotic topics”, then maybe don’t click on them. It will save you the energy of using your hand to click and type your childish complaints, and it will save us the headache of reading and dealing with it.