Today I tried to create a local script that creates new instances in the workspace for the entire server but unfortunately I don't understand how to communicate after the filtering enabled update and I wasted somewhere in between an hour and a half to 2 hours trying to figure it out using remote functions and events until I scrapped everything except the local script in one of the starter gui's, Here it is:
script.Parent.MouseButton1Click:Connect(function() local MusicFolder = Instance.new("Folder", workspace) local SongId = Instance.new("NumberValue", workspace) local Username = Instance.new("StringValue", workspace) SongId.Value = script.Parent.Parent.TextBox.Text Username.Value = script.Parent.Parent.Parent.Parent.Parent.Name SongId.Parent = MusicFolder Username.Parent = MusicFolder SongId.Name = "SongId" Username.Name = "Username" MusicFolder.Parent = game.Workspace.MusicGenerator end)
Could someone please show me how to make the folder and values spawn in the workspace for the entire server and not just for the client?
To bypass filtering enabled, you'll have to use remote events, since the client's changes to the workspace do not replicated. I wasn't sure what the parents of your script were, so excuse the poor variable names in the remote event.
--Local script local remote = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent") --wait for remote script.Parent.MouseButton1Click:Connect(function() remote:FireServer(script.Parent.Parent.Parent.Parent.Parent.Name,script.Parent.Parent.TextBox.Text) --send needed data end) --Server script local RepStorage = game:GetService("ReplicatedStorage") local remote = Instance.new("RemoteEvent") --create remote remote.Parent = repStorage remote.OnServerEvent:Connect(function(player,name,TextboxText) local MusicFolder = Instance.new("Folder") --second argument of .new() deprecated MusicFolder.Parent = workspace local SongId = Instance.new("NumberValue") SongId.Parent = workspace local Username = Instance.new("StringValue") Username.Parent = workspace SongId.Value = TextboxText Username.Value = name SongId.Parent = MusicFolder Username.Parent = MusicFolder SongId.Name = "SongId" Username.Name = "Username" MusicFolder.Parent = game.Workspace.MusicGenerator end)
Resources:
Accept and upvote if this helps!