Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

[BUG] I have a problem with ClickDetector?

This isn't really a scripting question, but I'm having a problem with ClickDetectors. When I hover over the part it is parented to, the click icon isn't showing up, and when I click the part, the ClickDetector.Triggered event doesn't fire.

The weird thing is, is that it is inconsistent. I have 9 parts with click detectors and only 6 of them work, with the other 3 having the problem above.

Also, I'm not sure if this is important, but for the parts that I couldn't get the Click detectors to work, I couldn't select it in the workspace even though the parts aren't locked. I had to select them in the explorer. I didn't have this problem with the 6 working parts

1 comment

0

Thats definitely a weird/bad roblox studio glitch

2 answers

This is weird and this has never happened to me. Something you can do is add a script that when the part is clicked something happens, that way you know if it's working or not. [Position changes, BrickColor changes etc.]

BrickColor Change Example:

script.Parent.MouseClick:Connect(function()
	script.Parent.Parent.BrickColor = BrickColor.new("Black")
	wait(2)
	script.Parent.Parent.BrickColor = BrickColor.new("Medium stone grey")
end)

Position Change Example

-- Pos = Position
script.Parent.MouseClick:Connect(function()
	script.Parent.Parent.Position = Vector3.new(-39.734, 8.869, 62.815) -- Add your own pos
	wait(2)
	script.Parent.Parent.Position = Vector3.new(-39.734, 8.869, 98.843) -- Add your own pos
end)

2 comments

0

I hope this helped a bit at least.

0

Yes, I made it so it printed something when clicked, but nothing happened(for the 3 non working parts

This is weird and this has never happened to me. Something you can do is add a script that when the part is clicked something happens, that way you know if it's working or not. [Position changes, BrickColor changes etc.]

BrickColor Change Example:

script.Parent.MouseClick:Connect(function()
    script.Parent.Parent.BrickColor = BrickColor.new("Black")
    wait(2)
    script.Parent.Parent.BrickColor = BrickColor.new("Medium stone grey")
end)

Position Change Example

-- Pos = Position
script.Parent.MouseClick:Connect(function()
    script.Parent.Parent.Position = Vector3.new(-39.734, 8.869, 62.815) -- Add your own pos
    wait(2)
	  script.Parent.Parent.Position = Vector3.new(-39.734, 8.869, 98.843) -- Add your own pos
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.