Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[BUG] I have a problem with ClickDetector?

Asked by 3 years ago
Edited 3 years ago

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

0
Thats definitely a weird/bad roblox studio glitch Galaxybombboy 134 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago

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)
0
I hope this helped a bit at least. Nitrolux200 62 — 3y
0
Yes, I made it so it printed something when clicked, but nothing happened(for the 3 non working parts Dr_Smartypants123 86 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

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)

Answer this question