What do you want to achieve?
When we have a transparent “part” at 0.7 we don’t see the cursor and get no points, but when the transparency is 0
The cursor appears and the points are registered
What is the issue? Include screenshots / videos if possible!
script.Parent.ClickDetector.MouseClick:Connect(function(player)
local Part26 = game.Workspace.RotaModel1.Part26
local ROtarandom = math.random(3,5)
local PlayerPoind = player.leaderstats.Points
local level = player.leaderstats.level
if player then
Part26.Transparency = 0.7
wait(0.3)
Part26.Transparency = 0
end
if Part26.Transparency(0) then
player = false
else
player = true
end
PlayerPoind.Value = PlayerPoind.Value + ROtarandom
end)
What solutions have you tried so far?
Tried Searching in Toolbox and DevForum but didn’t work
local part=script.Parent
local clickDetector=part.ClickDetector
clickDetector.MouseClick:Connect(function(player)
if part.Transparency~=0 then return end -- just making sure the transparency is 0 before running the rest of your code
-- your mouseclick code
end)
part:GetPropertyChangedSignal("Transparency"):Connect(function()
if part.Transparency==0 then
clickDetector.MaxActivationDistance=32
else
clickDetector.MaxActivationDistance=-1 -- this pretty much disables the click detector
end
end)