-
What do you want to achieve? A function that converts the drawing from StarterGUI into painting body (SurfaceGUI)
-
What is the issue? You can only see your painting except for other player’s SurfaceGUI painting
-
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)