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

Why isn't this clone script not working on ROBLOX Player while it IS working on ROBLOX Studio?

Asked by 7 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.
function a()
    local plr = game.Players.LocalPlayer
    if plr.PlayerGui:FindFirstChild("UI") then
        print(plr.Name.." already has the UI")
    else
        script.Parent.UI:Clone().Parent = plr.PlayerGui
    end
end

script.Parent.ClickDetector.mouseClick:Connect(a)
0
The ClickDetector doesn't have an event called "mouseClick;" the event for when a player clicks on it is called "MouseClick." (line 10) TheeDeathCaster 2368 — 7y
0
Believe me, I tried it too, and the mouseClick event is recommended, like, it appears when you start typing. iDelta_Dev 2 — 7y

Answer this question