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

I need to see if this script is efficient and if there if a way to improve it?

This is my script, I'm trying to make this the most optimized I can.

script.Parent.Touched:Connect(function(t)
	if not(t.Locked)then
		t:Destroy()
	end
end)

this is a giant area covering the lobby of the map, we have a a building feature and I don't want anyone building in the lobby.

1 comment

0

Then use a Boolean to disable the building feature. If it is integrated into a Tool, then simply remove it from their inventory.

1 answer

✓ Accepted answer

Like what Feahren said use a Boolean value and if its a tool remove it from their inventory. If you don't want anyone building in the lobby then you can enable the feature once they get teleported to a map. You can do this by simply using remote events or functions.

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