Advertisement
Anukun_Lucifer

DestroyWallScript

Sep 27th, 2023
1,214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.28 KB | None | 0 0
  1. local button = script.Parent.Parent
  2. local prox = script.Parent
  3.  
  4. prox.Triggered:Connect(function()
  5.     local myvalue = button:FindFirstChild("MyValue")
  6.     if myvalue then
  7.         myvalue.Value = myvalue.Value + 1
  8.         if myvalue.Value == 5  then
  9.             workspace.Wall:Destroy()
  10.         end
  11.     end
  12. end)
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement