So I have a keycard door, and when I put a tool that opens a door in StarterPack it works, but I have a tool giver and it is working, and when I get tool from toolgiver door does not want to open
Door script:
script.Parent.Touched:Connect(function(hit)
if hit.Parent.Name == "Dollar" then
script.Parent.CanCollide = false
script.Parent.Transparency = 0.5
wait(2)
script.Parent.CanCollide = true
script.Parent.Transparency = 0
end
end)
Tool is in Lighting:
If someone know what is problem, I would appreciate their help! Thanks.
Yep, unless OP is using a tool giver that changes the name.
Unlikely, but it seems like the issue is with the script that gives the player the tool, rather than the door script itself.
If it’s firing when the tool is placed in the StarterPack and the equality check pertains to the name, then my first question would be to check the name.