Cloned character does not activate scripts

What I want to do is click a “hire worker button” which clones a humanoid present in ReplicatedStorage, then it activates the scripts disabled within the humanoid such as pathfinding, basic animations, and a talking script.

The hiring button works and clones the dummy and all of the scripts are enabled, but none of the scripts do anything. No animations take place on the character, no talking, or pathfinding.

When I have the dummy already in workspace before I “run” my tests, everything works fine. But when I enable the scripts manually after clicking “play here” it no longer functions. Does anyone have any ideas on what is wrong?

Here is the script:

local workerUI = script.Parent

local worker = game.ReplicatedStorage.Bots.RecruitDummy

local mainFrame = workerUI.Background.Main
local mainExitBT = mainFrame.TitleBar.ExitBT
local hire = mainFrame.HireBT

hire.Activated:Connect (function()
local NewWorker = worker:Clone()
NewWorker.Parent = game.Workspace
NewWorker.Animate.Disabled = false
NewWorker.PathFinding.Disabled = false
NewWorker.Talk.Disabled = false

end)

mainExitBT.Activated:Connect(function()
workerUI.Enabled = false
end)

1 Like

is this a localscript you are using to clone?

1 Like

Yes sir it is a local script within a GUI

1 Like

thats why, you can’t use a localscript and then disable serverscripts and expect them to work. Use a remoteevent to clone it

2 Likes

Alright thanks for the feedback, I will try to work on that.

1 Like