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

Someone help me with this Script?

Asked by 10 years ago

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
0
@Line 08: Where is it connecting to, or is it making a new Sound? If its making a new sound, it would be `play=Instance.new("Sound",PARENTHERE)play.SoundId="http://www.roblox.com/asset/?id=SOUNDID"` and when you want it to play you would do `play:Play()`. TheeDeathCaster 2368 — 10y

1 answer

Log in to vote
-2
Answered by 10 years ago

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 :/

Ad

Answer this question