function onClicked(click)
local decal = Instance.new("Decal")
if script.Parent ~= nil then
decal.Texture = "http://www.roblox.com/asset/?id=48622144"
decal.Parent = script.Parent
---------------------------------------------
--[[ That's all I have have so far.That I need is, if it's clicked AGAIN, The Part is removed. The problem is, is that I don't know how to make a "OnClick" again in the same script..]]
--[[ Example I want:
if onClicked[statement to make it say "again"] == then
script.Parent:remove()
end]]
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Clicked = false
function onClicked(click)
if Clicked then
script.Parent:Remove()
else
local decal = Instance.new("Decal")
if script.Parent ~= nil then
decal.Texture = "http://www.roblox.com/asset/?id=48622144"
decal.Parent = script.Parent
Clicked = true
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Or something like that. I can explain it in more detail if you don't understand that.