I am wondering how I would make a working click detector script that will changed the properties of another object. I can script a very little amount. Thanks.
Two people gave me good answers so I can’t choose one for a solution! Thanks for your help.
Hello there! Have you looked around the Dev Forums on this topic? There are many resources that you could find on Click Detectors!
So going about learning how to script Click Detectors, there is a very resourceful developer API in which you can learn how to create and script click detectors, this can be found here:
Here is an example from the Developer API that I edited, on changing the properties of a Door Part!
-- The door 'BasePart'
local door = script.Parent
-- Create a ClickDetector
local ClickDetector = Instance.new("ClickDetector")
ClickDetector.Parent = door
ClickDetector.MaxActivationDistance = 10
-- Open door on left mouse click
ClickDetector.MouseClick:Connect(function()
door.Transparency = 0.8
door.CanCollide = false
wait(1)
door.Transparency = 0
door.CanCollide = true
end)
I actually find it very annoying reading or replying to posts that could of been solved with a two minute search. It’s also wasting your time asking as well, as you probably didn’t get the answer as fast as a quick search.
How am I to know that you weren’t trying to make a more complicated type of click detector? There’s many topic titles that lack detail, I had no idea that this wasn’t one of them. Also, I will not be replying anymore after this reply, it is getting off topic.