So I'm learning to script with FilteringEnabled. I'm trying to make a TextButton which inserts a Folder and another Folder into the first folder that is in the local player when clicked. I'm sure I've made a mistake somewhere because it works only on "Play Solo" mode.
The local script:
script.Parent.MouseButton1Click:connect(function() script.Parent.LocalScript.RemoteEvent:FireServer() end)
The script:
script.Parent.RemoteEvent.OnServerEvent:connect(function(Player) if Player:FindFirstChild("Folder")then Player.PlayerGui.ScreenGui:Destroy() local Lytis=Instance.new("Folder") Lytis.Name="Moteris" Lytis.Parent=Player.Folder else Player.PlayerGui.ScreenGui:Destroy() local Folder=Instance.new("Folder") Folder.Parent=Player local Lytis=Instance.new("Folder") Lytis.Name="Moteris" Lytis.Parent=Player.Folder end end)
So it doesn't work on testing in a server nor in a published to Roblox place. The output and developer console says nothing...
P.S. LocalScript is in TextButton. And the Script and RemoteEvent is in LocalScript.
Please, help me out!