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)