Alright, so basically what I want the script to do is get one’s playerGUI locally, then use a remote to clone the GUI onto a part, however I can’t seem to get the script to work.
local player = game.Players.LocalPlayer
local remote = game.ReplicatedStorage.GuiEvent
while true do
for i,v in pairs(player.PlayerGui:GetChildren()) do
if v.ClassName == "ScreenGui" then
for i,s in pairs(v:GetChildren()) do
if s.ClassName == "Frame" then
clonegui = s:Clone()
clonegui.Parent = workspace.Part.SurfaceGui
if clonegui:FindFirstChild("ChatChannelParentFrame") then
clonegui.ChatChannelParentFrame.Frame_MessageLogDisplay.Scroller.CanvasPosition = game.Players.Rescripted_Developer.PlayerGui.Chat.Frame.ChatChannelParentFrame.Frame_MessageLogDisplay.Scroller.CanvasPosition
end
remote:FireServer()
end
end
end
end
task.wait(0.1)
workspace.Part.SurfaceGui:ClearAllChildren()
end
then the code should send out a remote to clone the player gui to server script, but I cant understand why its not working.