Hi - I have a system built into a vehicle that controls a multitude of lights and sirens on the car - the changes need to happen on the server.
The script that does all of this works fine - I just need to clone a copy of the script and folder containing the RemoteEvents for each player that joins.
Here is my current script:
local FolderToClone = game.ReplicatedStorage.ELS.DuplicateEventFolder
local ScriptToClone = game.ServerScriptService.ELS.DuplicateScript
game.Players.PlayerAdded:Connect(function(Player)
local ClonedFolder = FolderToClone:Clone()
ClonedFolder.Name = Player.Name
local ClonedScript = ScriptToClone:Clone()
ClonedScript.Name = Player.Name
ClonedScript.Enabled = true
end)
For reference, this is what the Explorer looks like:
At the moment it just won’t clone either of these two things. There are no errors being thrown up in the Output.
Any help would be greatly appreciated!