i've tried to make a script that when the part is neon, it will break the joints of the player. i put this script in the part and every 5 seconds it changes from neon to smooth plastic and this works.
while true do wait(5) script.Parent.Material = Enum.Material.Neon if script.Parent.Material == Enum.Material.Neon == true then wait(5) script.Parent.Material = Enum.Material.SmoothPlastic end
but when i put this script in, the block just stays neon and doesn't kill me.
while true do
wait(5)
script.Parent.Material = Enum.Material.Neon
if script.Parent.Material == Enum.Material.Neon == true then
wait(5)
script.Parent.Material = Enum.Material.SmoothPlastic
if script.Parent.Material == Enum.Material.Neon == true then
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild ("Humanoid") then
hit.Parent:BreakJoints()
end
end)
end
end
any solutions to this? thanks

3 comments
thanks a lot man, i'm a very new scripter so this help is very appreciated
@notoriousNoah10 if this answered your question, please accept the answer.
actually no thats not it. i wanted it so that if the block is every 5 seconds it changes from smoothplastic to neon, and if you touch it while its neon then you die