function onClick(Player) screen = game.ServerStorage.Room1 clone = screen:Clone() clone.Parent = Player.PlayerGui wait(1) clone:Destroy() end script.Parent.ClickDetector.MouseClick:Connect(onClick)
I don't get any errors whatsoever, and I was using it earlier and it worked perfectly fine. I have no idea what happened and why it no longer works. I even set everything back to the way it was when it was working and it still didn't work.
There are two things wrong with it. First thing is that the values like clone = screen:Clone()
aren't working because there is no local. The 2nd thing is after 1 second it destroys the clone it just made. So It would take on the client for 1 second and then get removed. This is the fixed code.
function onClick(Player) local screen = game.ServerStorage.Room1 local clone = screen:Clone() clone.Parent = Player.PlayerGui end script.Parent.ClickDetector.MouseClick:Connect(onClick)
Did my answer fix the issue? Please accept my answer it will give us both rep. Was my answer good? Upvote it as you wish, or well even downvote but that takes away rep :(