How to make a collectable coin in Roblox Studio!

Channel:
Subscribers:
545
Published on ● Video Link: https://www.youtube.com/watch?v=V0OD8wPgxq0



Changes
Game:
Changes (2021)
Duration: 0:00
54 views
3


In todays video, I show you how to make a collectable coin for your Roblox game! enjoy (:

coin script:
----------------------------------------------------
local stat = "Coins"
local respawnTime = 30
script.Parent.Touched:Connect(function(hit)
if script.Parent.Transparency == 1 then return end
script.Parent.Transparency = 1
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if not player then script.Parent.Transparency = 0 return end
player:WaitForChild("leaderstats"):WaitForChild(stat).Value += 1
wait(respawnTime)
script.Parent.Transparency = 0
end)

------------------------------------------------------

leaderstat script:

------------------------------------------------------

game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player

local Coin = Instance.new("IntValue")
Coin.Name = "Text Here" -- Change this to what you want the leaderstat name to be
Coin.Value = 0
Coin.Parent = leaderstats
end)

--------------------------------------------------------



tags: #roblox #robloxstudio #tutorial #gaming #education #educational #trending #robloxstudiotutorials #new #viralvideo #coin




Other Videos By ScriptMaster


2024-09-25New Roblox Devs be like: #funny #shorts #short #robloxstudio #roblox #gaming #trending #new #cool
2024-09-22V1.4 IS HERE! #robloxstudio #trend #shorts #short #trending #roblox #new #shortvideo #shortsvideo
2024-09-14Nah Roblox graphics 🔥#roblox #shorts #short #shortvideo #trending #trendingshorts #new #subscribe
2024-09-081 minute vs 10 minute vs 1 hour Roblox simulator game1
2024-09-02How to make a leaderstat in Roblox Studio!
2024-08-31How to force players into first person for your Roblox game in 30 seconds! #shorts #robloxstudio
2024-08-30V1.1 is here! (avatar outfit designer) #robloxstudio #roblox #gaming #shorts #short #shortvideo
2024-08-29How to make a Banned players script in Roblox Studio in 30 seconds! #robloxstudio #shorts #short
2024-08-28How to make a landmine for your Roblox Game in 30 seconds! #robloxstudio #roblox #shorts #short
2024-08-27The best ways to earn Robux in Pls Buy Me Roblox!
2024-08-25How to make a collectable coin in Roblox Studio!
2024-08-24You need to try this Roblox game! #shortvideo #shorts #short #roblox #new #trending #viralvideo
2024-08-23How to make shift to sprint for your Roblox game in 30 seconds! #roblox #shorts #short #shortvideo
2024-08-21I made my first game!
2024-08-17How to make a conveyor belt for your Roblox game in 30 seconds! #roblox #robloxstudio #shorts #short
2024-08-15All secret codes in pls buy me Roblox!
2024-08-14How to make a zombie/NPC spawner in Roblox Studio!
2024-08-13All my savings 💀 #roblox #shortvideo #robloxstudio #memes #shorts #short #shortsvideo #robloxmemes
2024-08-13The most realistic Roblox game! 😲 #roblox #robloxstudio #shortvideo #shortsvideo #shorts #short #new
2024-08-11The best Roblox Studio plugins for builders. #roblox #robloxstudio #shorts #short #shortvideo #new
2024-08-08You NEED to try this tag game! #gaming #roblox #robloxshorts #shortvideo #shortsvideo #shorts #short