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

How do i enable or disable a script using another script?

this is the code i used but didnt seem to be working im new to this so idk how it should work

SuperBlock = game.Workspace:WaitForChild("Script")

local function onTouch(hit)
	

	if(hit.Parent:FindFirstChild("Humanoid") ~= nil) then
		SuperBlock.enabled = true
		print("Done")
	end
end

1 answer

✓ Accepted answer

This should help you, enabled isn't a valid member of the script.

SuperBlock = game.Workspace:WaitForChild("Script")

game.Workspace.Part.Touched:Connect(function()
	if SuperBlock.Disabled == false then
		SuperBlock.Disabled = true
	else
		SuperBlock.Disabled = false
	end
end

Disabled can disable scripts.

~ Dan_PanMan, advanced scripter.

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