Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to clone ScreenGui into local PlayerGui?

Asked by 4 years ago

Right now I am using this script:

local Player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
    script.Parent.Parent.Parent.Parent.ScreenGui:Clone().Parent = Player.PlayerGui
end)

I don't get any errors. As I think the problem might be that I am clicking the button inside SurfaceGui. Hope someone know how to fix this

0
I think that you need to use a Remote Event. Kataclysmix 23 — 4y
0
If you are using a LocalScript inside workspace then it ain't gonna work. put the local script inside Starter player scripts or StarterGui and then run it. define where the UI you want to clone is with a different path. game > Workspace > Wherever it is. bostaffmanbulgaria1 89 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

I think you need to use a remote event. Here are some links: https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events https://developer.roblox.com/en-us/api-reference/property/Workspace/FilteringEnabled

Ad

Answer this question