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

How do I make it so when this button is clicked, a decal will be placed on the block?

Asked by 9 years ago
function onClicked(playerWhoClicked)
    game.Workspace.Door.CanCollide = false
game.Workspace.Door.Transparency = 10000
instance.new("Decal")
    game.Workspace.Decal.Texture = 130742396
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
0
Umm use the lua text box. HexC3D 830 — 9y
0
I tried, hold on let me edit. zachhg03 35 — 9y
0
There fixed the script HexC3D 830 — 9y

1 answer

Log in to vote
1
Answered by
HexC3D 830 Moderation Voter
9 years ago
 function onClicked(playerWhoClicked) 
game.Workspace.Door.CanCollide = false 
game.Workspace.Door.Transparency = 1
z =Instance.new("Decal") 
z.Parent = game.Workspace.Door
z.Texture = 'rbxassetid://130742396'
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

Hope this helps.

Plus 1 if this helped, check mark if this answered your query :)

Ad

Answer this question