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

How do you make a parts limit script? And where do i put it?

Asked by 2 years ago
Edited 2 years ago

Im trying to make a game that is made of survival with build tools and i dont know how to make a part limit (a part limit script that deletes the parts when its over the part limit) and says to a player but that player is the only one sees it and says "you ran out of blocks!"

Im new to scripting so i dont know how to do it.

1 answer

Log in to vote
0
Answered by 2 years ago

Just make a value inside the script


local blocks = 10 local popupui = -- Reference 'Ran out of block' text here script.Parent.Activated:Connect(function() if blocks <= 0 then popupui.Visible = true wait(1) popupui.Visible = false else -- the place blocks section blocks -= 1 end end)
0
thx MOJANGcreator091 60 — 2y
Ad

Answer this question