So, I put a crosshair decal on my gun and i want it to show when i hold Right Click and hide when i let go of Right Click. It works in studio but it doesn't work when i test it on a Roblox server. BTW: This is a part inside a tool. Here is the script:
local tool = script.Parent.Parent
local mouse = game.Players.LocalPlayer:GetMouse()
local decal = script.Parent.Decal
decal.Transparency = 1
tool.Equipped:connect(function()
mouse.Button2Down:connect(function()
script.Parent.Decal.Transparency = 0
end)
mouse.Button2Up:connect(function()
script.Parent.Decal.Transparency = 1
end)
end)
tool.Unequipped:connect(function()
script.Parent.Decal.Transparency = 1
end)
Thanks!

3 comments
local or server (normal)?
Its a normal script.. not a local, it is inside the part with the decal and the part is inside the tool
Wait, should it be local?