I have a mesh part inside of ReplicatedFirst with a simple script attached:
print("Hello world!") while true do print("Hello world!") wait(1) end
However, when I clone it into workspace, it doesn't run. I don't understand why. What am I doing wrong?
Edit:
I tried to set the script's Disabled property to True and then after I cloned the part, set it back to false, but it still didn't run:
This is the function I am using to spawn the meshPart
local function CreateNewPart(partToCreate, position) local copy = partToCreate:Clone() copy.CFrame = CFrame.new() copy.Anchored = true copy.CanCollide = true copy.Position = position copy.Orientation = Vector3.new(0,0,0) copy.Parent = platformsFolder copy.Script.Disabled = false print(copy.Script.Disabled) return copy end
The output from the print() is "false"
You can create the script inside the block and activate its "Disabled" property, then when you clone the Part with a script you deactivate the Disabled of the Script that is inside the Part