My click detector isn't working. I have have filter enabled disabled, and the camera script is a custom view or manipulation. I am trying to make a parody of clicker heroes but with noobs. Why doesn't my click detector script work with the camera script. Removing the camera fixes the script but ruins the point of the game. Any fixes?
Click Detector
script.Parent.ClickDetector.MouseClick:connect(function(player)
local stats = player:WaitForChild("leaderstats")
local stat = player:WaitForChild("stats")
local xp = stats:WaitForChild("XP")
local gold = stats:WaitForChild("Gold")
local damage = stat:WaitForChild("Damage")
local health = script.Parent.Parent.MaxHealth.Health
health.Value = health.Value - damage.Value
if health.Value <= 0 then
script.Parent.ClickDetector.Sound:Play()
script.Parent.Parent.Parent.Noob1:Destroy()
wait(1)
local get = game.Lighting.Monsters.Noob:GetChildren()[math.random(#game.Lighting.Monsters.Noob:GetChildren())]
get:Clone().Parent = game.Workspace.Monsters
gold.Value = gold.Value + 25
xp.Value = xp.Value + 10
end
print (health.Value)
end)
Camera Script
game.Players.PlayerAdded:connect(function(plr)
plr:WaitForChild('Backpack')
game.Soundscape.LocalScript:Clone().Parent = plr.Backpack
end)
Camera Script 2
local cam = game.Workspace.CurrentCamera
local part = game.Workspace.FocusHere
cam.CameraType = 'Attach'
cam.CameraSubject = part
wait(.05)
cam.CoordinateFrame = CFrame.new(part.Position - Vector3.new(0,0,0))
cam.CameraType = 'Scriptable'

2 comments
My camera script works fine theres 2 parenthesis because its the closing the other (part.blahblah(blah,blah.blah))