Scripts not running

Hello everybody!
So, lately I’ve been working non-stop on this tower defense game I’m developing.
Everything was going fine until, today, I found out that some of my scripts weren’t working at all.

The issue:
While working with a Part and a ClickDetector inside, I noticed that the LocalScript (which should have given a message to the server via remote events upon click) wasn’t working at all. I tried putting some prints and breakpoints to check everything, but nothing happened. After some time, I found out that not only was the script not running, but none of the other LocalScripts or ServerScripts were either!

The code I used:

print("Script running!")
local clickDetector = script.Parent:WaitForChild("ClickDetector")
local remote = game:GetService("ReplicatedStorage"):WaitForChild("TowerUI")

clickDetector.MouseClick:Connect(function()
	print("Click!")
	remote:FireServer(script.Parent.Parent,script.Parent.Parent.Stats.Tower.Value)
end)

The output:
Nothing.

The solutions I tried:
First of all, as stated before, I tried creating more Local and Server scripts, leaving them with just print("Hello world!"), but nothing. The output is blank.

Other notes:
Here’s a screenshot of the hierarchy of the script:

You might notice that it’s placed in ReplicatedStorage, but the model gets cloned and put inside Workspace through another script. Also, the script is never disabled / cloned / destroyed anywhere.

LocalScripts don’t run in Workspace. The scripts should realistically be running but only if they’re cloned to the Workspace by another Script. In either case I think it’d be better to divorce the logic from the models, as in not putting scripts in tower models and instead registering them from an outside master script that recognises newly placed towers and sets them up to begin working.

1 Like

I see. Thanks a lot, I didn’t know about this and I already have a monitor script outside of the tower, so I might try implementing the LocalScript with it. Thanks again.