Script disable problem

So in ServerScriptService I have a folder with scripts, and I have one script that disable health Regeneration,and it is disable right now, but in that folder I have MainScript and in that MainScript I want to when game start after like 10 seconds Health Regeneration script is enabled, so what is code for that,

This don’t work:

script.Parent.HealthRegenerationDisable.Disable = false

Btw it is a normlan script not local, so if you know the problem I will appreciate your help.
Thanks

Maybe try this?

script.Parent.HealthRegenerationDisable.Disabled = false

to enable the script

2 Likes

I typed that is not working, If you didn’t see

in your original post you misspelled “Disabled” as “Disable”

1 Like

Maybe?

script.Parent:WaitForChild("HealthRegenerationDisable").Disabled = false
1 Like

He is setting it to disabled = true in studio read the entire post

1 Like

Ah, my bad.

Nevertheless, .Disabled was mispelled.

1 Like

Im sorry, but its not working??

It is not working idk why??? :frowning_face:

Are you trying to disable or enable the script?

1 Like

I am trying to enable script

Here is the script,btw it is normal script in SSS:

local Players = game:GetService("Players") 

Players.PlayerAdded:Connect(function(player) 
	player.CharacterAdded:Connect(function(Character) 

		local ScriptCheck = Character:FindFirstChild("Health")

		if ScriptCheck and ScriptCheck:IsA("Script") then 
			ScriptCheck:Destroy() 
		end 
	end) 
end) 

You are destroying the script not disabling it

You’re removing the script instead of disabling/enabling it.

Try this:

local Players = game:GetService("Players") 

Players.PlayerAdded:Connect(function(player) 
	player.CharacterAdded:Connect(function(Character) 

		local ScriptCheck = Character:FindFirstChild("Health")

		if ScriptCheck and ScriptCheck:IsA("Script") then 
			ScriptCheck.Disabled = true --set to whatever boolean you need
		end 
	end) 
end) 

That’s the HealthRegenerationDisable script

If you’re trying to enable it then why did you delete it in

But that’s the HealthRegenerationDisable script, in that script all is okay

Actually, I can easily disable my script in-game using studio’s explorer.

The only issue, however: it doesn’t run again.

You cant enable and disable this script anyways. Use a better system then depending on disable and enable

Well, as I said in an earlier post (like three minutes ago lol):

I found out that you can’t make a script run again after disabling it.
You should use a RemoteEvent in the event of that happening.

Im not good at RemotEvents is there any tutorial at yt or??