Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why won't my script work when it's in a local one but will when it is in a regular one?

Im trying to make a Key script and I have one that works but only as a regular script. I need it to work as a local script so only the person with the key can go through the door. Does anyone know how to get this script to work as a local one?

script.Parent.Touched:connect(function(hit)
	if hit.parent.name == "Key1" and hit.Parent.ClassName == "Tool" then
		script.Parent.Transparency = 1
		script.Parent.CanCollide = false
	end
end) 

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.