Clone is not working (localscript)

local Players = game:GetService(“Players”)

local Part = script.Parent.Parent.ProximityPrompt.ScreenGui

local Gui = Part:FindFirstChildOfClass(“ScreenGui”)

local Prompt = script.Parent.Parent.ProximityPrompt

Prompt.Triggered:Connect(function()

local PlayerGui = Players.LocalPlayer.PlayerGui

local GuiClone = Gui:Clone()

GuiClone.Parent = PlayerGui

end)

1 Like

https://gyazo.com/1d16a13061ffb99397d07aa34eb42a4b

Proximity Prompts should be handled on the server, and GUI stuff should be handled on the client. Connect the two with a remote event.

1 Like

Oh ok i didn’t know that I will try

1 Like

Prompts can be handled via local scripts but this script is all over the place.

1 Like

Also your local script is in workspace so won’t run at all - as per this page: LocalScript

1 Like