#Mining system, Fire event

5 messages · Page 1 of 1 (latest)

vast crescent
#

Server Script Service

MineEvent.OnServerEvent:Connect(function(plr, ore, tool)
    print(plr, ore, tool)
end)
#

Local pickaxe script ```lua
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local MineEvent = game.ReplicatedStorage.MineEvent

script.Parent.Activated:Connect(function()
local Target = Mouse.Target
local tool = script.Parent

MineEvent:FireServer(Target)

end)```

#

when putting this code to action the outcome is

glossy hamletBOT
#

studio** You are now Level 2! **studio

vast crescent
#

the tool is "Nil:"