Hello, it is me again. I haven't scripted in a while and now I am slowly losing track of it. The script in question is that I am trying to make a part that kills you by default, but it can be toggled off with a ProximityPrompt. It shows no errors in the script, but it is not working and I do not know why. Here is the script that I made below.
local killCylinder = script.Parent
local interact = killCylinder:FindFirstChild("ProximityPrompt")
local function toggleCylinder()
if killCylinder.Material == "Neon" then
killCylinder.Material = "SmoothPlastic"
killCylinder.Transparency = 0.5
else
killCylinder.Material = "Neon"
end
end
interact.Triggered:Connect(toggleCylinder)```
** You are now Level 2! **