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

Part W/ClickDetector Help?

Asked by 8 years ago

local plr = game.Players.LocalPlayer local PartShop = game.StarterGui.KrakenShop local PartNpc = script.Parent local plrGui = plr.PlayerGui local ShopP = plrGui.KrakenShop.Kshop

function OnClicked(playerwhoclicked) local gui = PartShop:Clone() gui.Parent = plrGui local PShop = gui.Kshop PShop.Visible = true end script.Parent:connect(OnClicked)

Not Going Visible help

0
First off, make it readable Use code block. iNicklas 215 — 8y
0
mb i tried Lol xlaser23 60 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

You forgot to write "ClickDetector.MouseClick" before :connect

local plr = game.Players.LocalPlayer 
local PartShop = game.StarterGui.KrakenShop 
local PartNpc = script.Parent 
local plrGui = plr.PlayerGui 
local ShopP = plrGui.KrakenShop.Kshop

function OnClicked(playerwhoclicked) 
    local gui = PartShop:Clone() gui.Parent = plrGui 
    local PShop = gui.Kshop PShop.Visible = true 
end 

script.Parent.ClickDetector.MouseClick:connect(OnClicked)

Try to post your code inside the code block next time.

0
Still Didnt Become Visible xlaser23 60 — 8y
Ad

Answer this question