I am making a mining script and it is supposed to run when the player presses Button1, but nothing happens. Here is the script:
--LocalScript
local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
local Mining = false
local Strength = player.Strength
function Xplo()
Mouse.Target.Xplo.Enabled = true
wait(0.1)
Mouse.Target.Xplo.Enabled = false
end
Mouse.Button1Down:connect(function()
Mining = true
while true do
wait(0.1)
if Mining == true then
Mouse.Target.Durability.Value = Mouse.Target.Durability.Value - Strength
Mouse.Target.Break.Durabilty.Visible = true
if Mouse.Target.Durability.Value <= 0 then
local Dropz = Mouse.Target.Drop.Value
Mouse.Target.BottomImage:Destroy()
Mouse.Target.FrontImage:Destroy()
Mouse.Target.BackImage:Destroy()
Mouse.Target.LeftImage:Destroy()
Mouse.Target.RightImage:Destroy()
Mouse.Target.TopImage:Destroy()
Mouse.Target.Transparency = 1
Xplo()
local Item = game.ServerStorage.Dropz:Clone()
local pos = Mouse.Target.Position
Item.Position = Vector3.new(pos)
Mouse.Target:Destroy()
end
end
end
end)
Mouse.Button1Up:connect(function()
Mining = false
Mouse.Target.Durability.Value = Mouse.Target.FirstDura.Value
Mouse.Target.Break.Durabilty.Visible = false
end)

5 comments
Are there any errors when you play the game in Roblox Studio?
You don't know what
Mouse.Targetis yet! Check it prior to attempting to manipulate it.No errors. Have you also read the wiki about Mouse.Target? It is the object the mouse is pointing to. I am pointing to a part that has every single one of these things.
I dont get what you mean and what the point of the script does
So then your not a scripter