GUI doesn't clone into SurfaceGUI

  1. What do you want to achieve? A function that converts the drawing from StarterGUI into painting body (SurfaceGUI)

  2. What is the issue? You can only see your painting except for other player’s SurfaceGUI painting

  3. What solutions have you tried so far? Im trying to use RemoteEvent function, which fires from local to serverscript, this is where im stuck at.

-- LocalScript ( btw this is not full script )
local REbounce = false
local PE = RE:WaitYourChild("PaintEvent")
forwardbutton.MouseButton1Click:Connect(function()
	if REbounce == false then
		REbounce = true
		PE:FireServer(player, forwardside)
		wait(1)
		REbounce = false
	end
end)

-- ServerScript
local RE = game:GetService("ReplicatedStorage")
local PE1 = RE.PaintEvent
local forward = game.StarterGui.PaintGUI.MainFrame.CanvasFrame1.Folder


PE1.OnServerEvent:Connect(function(plr, forwardside, painting)
	local character = plr.Character
	local painting = character:FindFirstChild("Painting")
	local canvasgui = painting:WaitForChild("CanvasGuiForward")
	for i, q in pairs (forward:GetChildren()) do
		if q.Name == "Paint" then
			local clone = q:Clone()
			clone.Parent = canvasgui
		end
	end
end)

The player variable is already sent when a remote event is fired.

Change your code to this:

-- LocalScript ( btw this is not full script )
local REbounce = false
local PE = RE:WaitYourChild("PaintEvent")

forwardbutton.MouseButton1Click:Connect(function()
	if REbounce then
		return
	end
	
	REbounce = true
	
	PE:FireServer(forwardside)
	
	task.wait(1)
	REbounce = false
end)

-- ServerScript
local RE = game:GetService("ReplicatedStorage")
local PE1 = RE.PaintEvent

PE1.OnServerEvent:Connect(function(plr, forwardside, painting)
	if not forwardside or not painting then
		return
	end
	
	local character = plr.Character
	local painting = character and character:FindFirstChild("Painting")
	local canvasgui = painting and painting:FindFirstChild("CanvasGuiForward")
	
	if not canvasgui then
		return
	end
	
	local forward = plr.PlayerGui.PaintGUI.MainFrame.CanvasFrame1.Folder

	for i, q in ipairs(forward:GetChildren()) do
		if q.Name == "Paint" then
			local clone = q:Clone()
			clone.Parent = canvasgui
		end
	end
end)