How do i make working scripts inside cloned parts

(bfore getting to the point i just want to say that im not good at scripting so i dont really understand all the terms plus english isnt my first language)

okay so what im trying to do is to clone a part thats placed inside a folder, and that folder is placed inside workspace. theres a script placed inside the part that gives you a notification when thouched, also inside that script theres a local script that gives the notification a title, icon etc. after a cloned part is touched it gets destroyed and spawns another cloned part in another location.

the problem is that the script dosent seem to work on those cloned parts (the notification script works perfectly on normal parts btw).
what i tried to do is to put a invisible part with that script inside it where the parts are supposed to spawn. but that defeats the entire point considering that the player could accidentally find it.

i said before im not good at scripting so im getting help from everywhere i can find so im basing this whole thing around this this youtube tutorial

also a little note when the player touches one of the cloned parts i want them to be rewarded with a badge.

the script in question:
script.Parent.Touched:Connect(function(hit) if hit.Parent and hit.Parent:FindFirstChild("Humanoid") and game.Players:GetPlayerFromCharacter(hit.Parent) then local Clone = script.NotificationScript:Clone() Clone.Disabled = false Clone.Parent = game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui end end)

also the local script placed inside it:

game.StarterGui:SetCore("SendNotification", {
	Title = "title";
	Text = "text";
	Icon = "decal id";
	Duration = 3;
	
})

Keep the scripts disabled and only enable them after cloning.

How do i enable them after cloning?

Example below.

local Clone = script:Clone()
Clone.Parent = Location
Clone.Disabled = false
2 Likes