Bug on a clickpart

I did a clickpart but it wont turn transparency.

local ClickPart = game.Workspace.Clickpart

ClickPart.Mousebutton1Click:Connect(function()

ClickPart.Transparency = 1

end)

And yes i tried a localscript and script put it in to the clickdedector and just in part idk why it wont work.

Hmm, use MouseClick, not MouseButton1Down.

.MouseButton1Click() is for guis

put a click detector in the part and do

clickdetector.MouseClick:Connect(function()
    ClickPart.transparency = 1
end)

Ill try that. Ty. I hope it works.

It will, we promise you that gamer.

Ohhhhh. I dint know.

even if i can do play guis.

I do have one in there but still no work.

Oh i forgot to do varriable. fault

are you doing clickDetector.MouseClick or part.MouseClick

clickdedector.MouseClick Im using that but do i use a local script or a script

To clarify some stuff, localscript is only essential if you want it to happen only for the player who started the function, you’d also gain exclusive access to some stuff the normal script can’t.

The normal script is a server script, for an example if someone jumps, it will print someone jumped, if the whole server (7) jumped at the same time, it would print 7 times.

And if you made it so someone died, the whole server would die, magic of normal script.

You also need the instance ClickDetector to detect if you could click on a part, you can also change the maximum range to click a part from far away.

both work but, a local script, only the player will see the change while server script everybody will

ahh but do i put it in the part or the serverscriptservice

Inside the part, nwwnegnenwqignee

Make sure there’s a click detector instance inside the part and the script inside the part.

It just wont work ill make a video so you can see.

I meant, set the script and the clickdetector instance’s location inside the part.

robloxapp-20201017-1830380.wmv (2.1 MB)

local part = script.Parent
script.Parent.ClickDetector.MouseClick:Connect(function()
       part.Transparency = 1
end

@GamingWolfyt001