Hello, i’m trying to make a mining system like Mining inc remastered.
The thing is that i don’t know any tutorials on how to do a mining system like that game
in this topic i’m asking for resources or any tutorials no a entire script
it would be very helpful if you guys know a tutorial like that, i don’t want a model or a opensource just a tutorial or something so i can learn how to make my own.
Ty. But that tutorial is not what i want. In the topic i said a mining system like Mining inc remastered. and i did not saw any tutorials on how to make a system like that game. i will give you the link so you can understand: [!New Truck!] ⛏️Mining Inc Remastered ⛏️ - Roblox
Here’s the code if you don’t want to open random files off the internet:
--MineToolController LocalScript
local TagS = game:GetService("CollectionService")
local remotes = game.ReplicatedStorage.Remotes
local tool = script.Parent
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local MINE_TIME = 1.25
function isMineable(i: Instance)
return TagS:HasTag(i, "Mineable")
end
function findMineableTarget()
local target = mouse.Target
if isMineable then
return target
end
end
tool.Activated:Connect(function()
local mineableTarget = findMineableTarget()
if not mineableTarget then return end
local deactivated = false
local deactivatedC
deactivatedC = tool.Deactivated:Connect(function()
deactivated = true
print("Deactivated")
deactivatedC:Disconnect()
end)
task.wait(MINE_TIME)
if deactivated then return end
print("Mining")
deactivatedC:Disconnect()
remotes.ClientToServer.Mine:FireServer(mineableTarget)
end)
--MiningManager script
local TagS = game:GetService("CollectionService")
local remotes = game.ReplicatedStorage.Remotes
function isMineable(i: Instance)
return TagS:HasTag(i, "Mineable")
end
function mine(mineable)
TagS:RemoveTag(mineable, "Mineable")
mineable.Size *= 0.8
mineable.Anchored = false
end
remotes.ClientToServer.Mine.OnServerEvent:Connect(function(player, mineable)
if not isMineable(mineable) then return end
mine(mineable)
end)