Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I made this but how would i make this work without the tool?

Asked by 4 years ago
Edited 4 years ago

So i made this code but i have decied i dont want the tool how would i make it work without?

local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
local done = false
local disconnected = false
local deb = false
plr.Character.ChildAdded:Connect(function(x)
    mouse.Button1Down:Connect(function()
        if x.Name == "Dig" then -- change to the tool name
            if deb == false then
            disconnected = false
            if x.Parent == plr.Character then
                script.Parent.PutInStarterGui.Full.Visible = true
                script.Parent.PutInStarterGui.Full.Miniature:TweenSize(UDim2.new(1,0,1,0),"Out","Quad",1)
                wait(1)
                    if disconnected == false then
                        workspace.Main_Dig.Dig_event:FireServer(mouse.Hit.p)
                    end
                script.Parent.PutInStarterGui.Full.Miniature.Size = UDim2.new(0,0,1,0)
                script.Parent.PutInStarterGui.Full.Visible = false
            end
            else
                wait(1)
                deb = false
            end
        end 
    end)
end)
mouse.Button1Up:Connect(function()
    disconnected = true
    script.Parent.PutInStarterGui.Full.Miniature.Size = UDim2.new(0,0,1,0)
    script.Parent.PutInStarterGui.Full.Visible = false
    deb = true
end)
0
Remove line 8 and line 25 then try it... greatneil80 2647 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Click upvote and answer cause I made the code and I helped fix it for you xd

0
ok help LOL Deinonychusaurus 21 — 4y
0
U is greatus helper Deinonychusaurus 21 — 4y
0
ikr greatneil80 2647 — 4y
Ad

Answer this question