i tried using this script but it doesnt work (its a module script btw)

return function()
	script.Parent.Touched:Connect(function(t)
		if t.Name == "Pushbox" then
			if script.Parent:FindFirstChild("ColorSpecific") and script.Parent.ColorSpecific.Value then
				if t.Color == script.Parent.Color then t:Destroy() end
			else
				t:Destroy()
			end
		end
	end)
end

4 comments

0

Are you requiring the module script? If so, please send the script that requires it.

0

try changing it to script and not module script

0

just get rid of line 1 and line 11, and put the whole thing inside a normal script instead

0

and put said normal script in ServerScriptService