Hello I would like to know why my click detector isn’t working heres my script
script.Parent.MouseClick:Connect(function()
print("Hi")
if script.Parent.Parent.Parent.Spawn.Value == false then
if isBreaking.Value ~= true then
if plr.Values.Power.Value == "0" then
isBreaking.Value = false
else
isBreaking.Value = true
currentBreak.Value = "Crate"
game.ReplicatedStorage.Orbs:WaitForChild("Crate"):FireServer(plr)
while wait() do
Orbs.DescendantRemoving:Connect(function(part)
if part.Name == "Crate" then
isBreaking.Value = false
currentBreak.Value = " "
end
end)
end
end
end
print("sent")
elseif script.Parent.Parent.Parent.Spawn.Value == true then
print("Still spawning")
end
end)
It wont even print “Hi”