local this = game.Workspace.shop1.shopparts.detector
local db = false
this.Touched:connect(function(hit)
print "hit"
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
print("hit")
local char = hit.Parent
local plr = game.Players:WaitForChild(char.Name)
game.Workspace.CurrentCamera.CFrame = this.Parent.Parent.camparts.cam1.CFrame
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Fixed
end
end)
It will not even print hit for some reason. Can a local script allow detection of hits?

1 comment
you might want to add the debounce parts right after "this.Touched:Connect(function(hit)" somewhat like: local debounce = true (drop line) this.Touched:Connect(function(hit) (drop line) if debounce == true then (drop line) debounce = false (put your code in) debounce = true (drop line) end (drop line) end) ALSO it needs to be in a server script, not local