Start building

Roblox Spinning Coin Collector Script (With Respawn)

Tag any coin part 'Coin' to give players +10 Coins on touch and respawn the coin automatically 8 seconds later.

Type: ScriptExplorer: ServerScriptServiceLevel: Beginner
ScriptServerScriptService
-- Script in ServerScriptService
local Players = game:GetService("Players")
local CollectionService = game:GetService("CollectionService")

local COIN_VALUE = 10
local RESPAWN_TIME = 8

local function setupCoin(coin: BasePart)
	local busy = false
	coin.Touched:Connect(function(hit)
		if busy then return end
		local player = Players:GetPlayerFromCharacter(hit.Parent)
		local coins = player and player:FindFirstChild("leaderstats") and player.leaderstats:FindFirstChild("Coins")
		if not coins then return end

		busy = true
		coins.Value += COIN_VALUE
		coin.Transparency = 1
		coin.CanTouch = false

		task.delay(RESPAWN_TIME, function()
			coin.Transparency = 0
			coin.CanTouch = true
			busy = false
		end)
	end)
end

for _, inst in ipairs(CollectionService:GetTagged("Coin")) do
	if inst:IsA("BasePart") then setupCoin(inst) end
end

How to install in Studio

  1. Create coin Parts in Workspace (Anchored = true, CanCollide = false) and tag them Coin.
  2. Ensure your game creates a leaderstats Folder with a Coins IntValue.
  3. Place this Script inside ServerScriptService.

Tips & customization

  • Rotate tagged coins smoothly on the client with RunService.RenderStepped so they don't consume server bandwidth.

Common questions.

Why set CanTouch = false while hidden?

Setting CanTouch = false prevents Roblox physics from firing extra touch events while the coin is respawning.

More free Luau scripts.

All 16 scripts

Skip manual wiring.
Let Revix code & playtest it.

Start building free

Free to start. No card needed.