Unable to enable a disabled script from a server script?

Unable to enable a disabled script from a server script?
My script (In Server script Service):

local random2 = free_slots[math.random(1,#free_slots)]
local spawns = game.Workspace.Prison:WaitForChild("CellSpawns")
spawns:FindFirstChild(random2).Script.Enabled = true

Regardless of the error, you probably shouldn’t design your game around enabling and disabling scripts.

Can you show us your Output?

There is no output, Should I just do a remoteEvent?

RemoteEvents are only useful when crossing the client/server boundary. (E.g. sending an event from localscript to serverscript and vice versa)

By any chance are you trying to enable the serverscript from a localscript?

(Is either the target, or enabling script a localscript?)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.