How to add coins and powers to my game?(and that if you leave 4 glass walls you get coins for it
Please tell me what scripts u need if that here is not enough.
-replicated storage
-ball
-click detector
-script:
local c = script.Parent
local b = c.Parent
function Destroy()
b:Destroy()
end
c.MouseClick:Connect(Destroy)
-,,Generator" (round part)
-script:
local r = game.ReplicatedStorage
local b = r:WaitForChild("Ball")
local g = script.Parent
local n
local s
local c
local x
local y
function Generate()
04 | n.Size = Vector 3. new(s,s,s) |
05 | x = math.random(- 10 , 10 ) |
06 | y = math.random(- 10 , 10 ) |
07 | n.Position = g.Position + Vector 3. new(x, 0 ,y) |
09 | n.BrickColor = BrickColor.random() |
end
while true do
14 | print ( "Pozosta?o" ..c.. "s" ) |