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

This dialouge script only works one time, then gets "destroyed", Why?

Asked by 5 years ago
Edited 5 years ago

So, I'm working on a shop that opens a dialogue box when you click on it.

function onClicked(playerWhoClicked)
    if playerWhoClicked.PlayerGui:FindFirstChild("SHOPGUI") then
    else
        local c = script.SHOPGUI:Clone()
        c.Parent = playerWhoClicked.PlayerGui
    end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

But when i talk to the shopkeeper once i can't talk to him again... How can i fix this?

Danke!

Answer this question