Okay what I'm trying to do is have a tool "listen" for a click and then take appropriate action as suggested by a user named "yumtaste" (in this case, it's making a door fade). For some reason, it does not work. The following script is inserted into the tool
local door = game.Workspace.BigDoor
script.Parent.Equipped:connect(function(mouse)
if mouse.Target then
if mouse.Target == door then
for i = 1, 10 do
door.Transparency = door.Transparency + .05
wait(.1)
end
wait(10)
door.Transparency = 0.5
end
end
end)
The following script is inserted into the door
if script.Parent.Transparency == 0 then
script.Parent.CanCollide = false
else
script.Parent.CanCollide = true
end
Does anyone see the problem?

2 comments
I'm confused, do I replace lines 2-4 with this?
lines 3-4