so it errors with this... Players.Deinonychusaurus.PlayerGui.BreadGui.TextButton.LocalScript:17: Expected 'end' (to close 'else' at line 11), got code :
local player = game:GetService("Players").LocalPlayer
local button = script.Parent
local Digfunction = player.Backpack.DigFunction
local xd = true
button.Activated:Connect(function()
if xd == true then
Digfunction.Disabled = true
xd = false
else
if xd == false then
Digfunction.Disabled = false
xd = true
end

1 comment
Oh thanks!