I'm trying to make a script that once you make a basketball go into a basket, you will get a cool camera rotation around your person while playing some good music. I tested it out and it doesn't work. Can someone help?
debounce = false function onTouched(hit) if debounce==false then local part = workspace.Hoop.Net.Ghostbrick part.Anchored = true part1.Touched:connect(function() print("Part was touched.") play.soundid = (141789936) wait(9.6) end) end game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) script.LocalScript:clone().Parent = character end) end) local cam = workspace.CurrentCamera local target = workspace.player local camera = workspace.CurrentCamera camera.CameraSubject = target local angle = 0 local part = workspace.Hoop.Net.InitialString part.Anchored = true part.Touched:connect(function() print("Part was touched.") end) while wait() do camera.CoordinateFrame = CFrame.new(target.Position) --Start at the position of the part * CFrame.Angles(95, angle, 180) --Rotate by the angle * CFrame.new(0, 0, -5) --Move the camera backwards 5 units angle = angle + math.rad(1) end game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid game.Workspace.CurrentCamera.CameraType = "Custom" end
ok try functioning loops well if u don't understnand me check all ur functions or the blue sub heade things and see where the "end" is for I see end in random places :/