Desired Outcome
To be more specific, I want to insert stuff into a folder that’s inside one of the players ReplicatedFirst/PlayerScripts.
Error
I try doing this, and although it’s not there on the client and I’m reading for the client side; it says the item is still there… what do I do to fix this?
I clone a localscript from the ReplicatedStorage/ReplicatedFirst to insert it into the ReplicatedFirst/PlayerScripts folder.
If you want the script(s), here ya go;
Scripts
Local Script that checks if theirs a local script inside the 'Cutscenes' Folder.
repeat
if game.ReplicatedStorage.ReplicatedFirst_J2T:FindFirstChild("Cutscene_Control") then
for i,Cutscene in pairs (game.ReplicatedStorage.ReplicatedFirst_J2T.Cutscene_Control:GetChildren()) do
if game.ReplicatedFirst.Cutscenes:FindFirstChildWhichIsA("LocalScript") and not game.ReplicatedFirst.Cutscenes:FindFirstChild(Cutscene.Name) then
game.ReplicatedFirst.Cutscenes:ClearAllChildren()
local CutsceneClone = Cutscene:Clone()
CutsceneClone.Parent = game.ReplicatedFirst.Cutscenes
CutsceneClone.Disabled = false
print("Ran")
else
warn(game.ReplicatedFirst.Cutscenes.Name.." still has the ".. Cutscene.Name.. " inside the Folder!")
end
end
end
wait(.05)
until script.Disabled == true
The Remote Event Script that clones the local script to a storage container of my choosing.
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(plr)
script.ree:Clone().Parent = game.ReplicatedFirst.ReplicatedFirst_J2T.Cutscene_Control
wait(5)
game.ReplicatedFirst.ReplicatedFirst_J2T.Cutscene_Control["ree"]:Destroy()
end)
Also, just so it’s clear; I just fire a remote event through a TextButton being clicked.
Thank you for any assistance you may provide.