Today I tried making one of my first scripts without any help. The idea is a part that is anchored to the ground and transparent. The part checks to see if another part is on top of it. If the check determines the part is not on the original part, then it spawns the second part, which happens to be a treasure chest.
So basically a chest spawner that will only spawn a chest if the chest is not there.
local function check()
local check = script.Parent:FindFirstChild("Chest Small")
if not check then
game.ReplicatedStorage.Tools["Chest Small"]:Clone().Parent = script.Parent
while true do
Yhe problem is it does not actually work. haha anyone able to help me with this?