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

Click Detector Within a Character Broken?

Asked by 5 years ago

I've encountered an interesting bug I was wondering if anyone knows a workaround for. I have a model inserted into the player's Character so I don't have to fiddle with Camera focus. I've discovered that when I do, the model's click detectors all stop working. Does anyone know why this happens and if there's a workaround for it?

here's the insertion code if you need it

script.Parent.ClickDetector.MouseClick:Connect(function(click)
    print (click.ClassName)
    wait()
    script.Parent.Parent.Parent = click.Character
    script.Parent.Parent.Name = click.Name.."sTruck"
    script.Parent.Parent.Cam.BillboardGui.Enabled = false
end)
0
Can you post a picture of the hierarchy? I am confused on why you are moving the script's parent's parent's parent. SteamG00B 1633 — 5y

Answer this question