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 10 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 — 10y
0
mb i tried Lol xlaser23 60 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

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

01local plr = game.Players.LocalPlayer
02local PartShop = game.StarterGui.KrakenShop
03local PartNpc = script.Parent
04local plrGui = plr.PlayerGui
05local ShopP = plrGui.KrakenShop.Kshop
06 
07function OnClicked(playerwhoclicked)
08    local gui = PartShop:Clone() gui.Parent = plrGui
09    local PShop = gui.Kshop PShop.Visible = true
10end
11 
12script.Parent.ClickDetector.MouseClick:connect(OnClicked)

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

0
Still Didnt Become Visible xlaser23 60 — 10y
Ad

Answer this question