I have this localscript that basically clones another script like this:
local input = script.Parent:WaitForChild("sb").editor.main local run = script.Parent:WaitForChild("sb").run local stop = script.Parent:WaitForChild("sb").stop local save_load = script.Parent:WaitForChild("sb").save local console = script.Parent:WaitForChild("sb").console local head = script.Parent:WaitForChild("sb").head local plr = game.Players.LocalPlayer local count = 0 local closer = script.Parent.sb.closer run.MouseButton1Down:Connect(function() count = count + 1 local s = workspace.TEMP:Clone() --Cloning the script s.Parent = game:GetService("Workspace") print(s.Parent) --returns Workspace s.ss.Value = input.Text print(input.Text,s.ss.Value) --returns print("test") s.Name = plr.Name.."_script"..count print(s.Name) --returns PyccknnXakep_script1 s.Disabled = not s.Disabled print(s.Disabled) --returns false --checker if game:GetService("Workspace"):FindFirstChild(plr.Name.."_script"..count) then print("script found") --returns script found else print("attempting to make another") --doesnt return local s = script.Parent.Script:Clone() s.Parent = game:GetService("Workspace") s.source.Value = input.Text s.Name = plr.Name.."_script"..count s.Disabled = not s.Disabled end end) stop.MouseButton1Down:Connect(function() if count <= 0 then return warn("Please create a script before deleting it!") end local s2find = workspace:FindFirstChild(plr.Name.."_script"..count) if s2find then count = count - 1 s2find:Destroy() --destroys the script else return end end)
Inside of the server script that is cloned:
wait() loadstring(script.ss.Value)()
The weird thing is the script clones and everything, but the script doesn't load the value.
Yes, LoadStringEnabled
is turned on and so is FilteringEnabled
. Any help?
Oh, I got it. The value will only appear for the client, and not the server. So the server still sees the value as blank. Instead, use RemoteEvents.