So... the title may be not good but I had nothing else in Mind:
I have tried to make a script that copies another script and a ClickDetector inside of it into a part... Called... Part. Everything worked fine. Inside the cloned script is a GUI which should appear at the Players screen if they click on the Part. The problem is: Nothing happens. I don't even get an Error or anything else it just won't work... here is my script:
script.Parent.ClickDetector.MouseClick(function()
script.Parent.Name = "tmp"
local p = game.Players.LocalPlayer.Name
local pm = game.Workspace:FindFirstChild(p)
p.Anchored = true
local pd = script.ScreenGui:clone()
pd.Parent = game.Players.LocalPlayer.PlayerGui
pd.Enabled = true
end)
I tried it with a LocalScript and a normal script but both unsuccessfully
I also tried creating a function and call that function when the part gets clicked
function onClick()
-- Just if you don't know what I mean
end
script.Parent.ClickDetector.MouseClick(onClick)
I hope you can help!
Greetings! :D

1 comment
Why are you anchoring the player's name on line 5?