Script cloning more than one Gui

Hello!

I am trying to make a system that teleports you and clones a GUI when it teleports you but it always clones more than 1 gui.

I have tried adding CanTouch = False into the script which didn’t help and I added a wait() before cloning which didn’t help either.

Screenshot 2025-04-14 123505

Thank you!

In order for us to see what you did wrong, we need to see your code. However, a solution to this is just checking if there isn’t already a cloned gui before cloning another one.

Hi, Thank you for the response!


Here is my code that is used to clone the gui.

Thanks

Yeah so, as I said:

TeleportPart1.Touched:Connect(function(hit)
    if not player.PlayerGui:FindFirstChild("ClonedGUI") then
        script.ClonedGUI:Clone().Parent = player.PlayerGui
     end
 end)

Just checks if there isn’t already a ClonedGUI inside the PlayerGui before cloning and parenting another one.

Perfect! I appreciate it!

Thank you

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.