The transparency part of this script is what isn't working. Does anyone know what is wrong with the gear script?
01 | local Mouse = game.Players.LocalPlayer:GetMouse() |
02 | local tool = script.Parent |
03 | local Equipped = false |
04 |
05 | tool.Equipped:Connect( function () |
06 | Equipped = true |
07 | end ) |
08 |
09 | tool.Unequipped:connect( function () |
10 | Equipped = false |
11 | end ) |
12 |
13 | Mouse.Button 1 Down:Connect( function (player) |
14 | if Equipped then |
15 | local Target = Mouse.Target |
This may or may not work
01 | local Mouse = game.Players.LocalPlayer:GetMouse() |
02 | local tool = script.Parent |
03 | local Equipped = false |
04 |
05 | tool.Equipped:Connect( function () |
06 | Equipped = true |
07 | end ) |
08 |
09 | tool.Unequipped:connect( function () |
10 | Equipped = false |
11 | end ) |
12 |
13 | Mouse.Button 1 Down:Connect( function (player) |
14 | if Equipped then |
15 | local Target = Mouse.Target |
The problem is that you for an extra = for if Target.Transparency = 1 then
and an end)
Here's the edited code:
01 | local Mouse = game.Players.LocalPlayer:GetMouse() |
02 | local tool = script.Parent |
03 | local Equipped = false |
04 |
05 | tool.Equipped:Connect( |
06 | function () |
07 | Equipped = true |
08 | end |
09 | ) |
10 |
11 | tool.Unequipped:connect( |
12 | function () |
13 | Equipped = false |
14 | end |
15 | ) |