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

local sound keeps looping and wont break function??

Asked by 5 years ago

Recently, I've been taking slow steps to code a player "God" script. However, after I figure out a problem, another problem mounts on. This time, local sound on line 76 keeps looping without end and I cant seem to break the function. No matter what I do, the problem gets worse. Any way to break the function permanently?

Here's the code: (Code starts after `)

`` local UIS = game:GetService('UserInputService') local plr = game.Players.LocalPlayer local Char = plr.Character or plr.CharacterAdded:Wait()

local key = 'L'

local Anim = Instance.new("Animation") Anim.AnimationId = 'rbxassetid://4906894017'

local Debounce = true

UIS.InputBegan:Connect (function(Input, IsTyping) if IsTyping then return

01end
02local KeyPressed = Input.KeyCode
03if KeyPressed == Enum.KeyCode.L and Debounce then
04    Debounce = false
05    local LoadAnimation = Char.Humanoid:LoadAnimation(Anim)
06    LoadAnimation:play()
07    print("The Crimson God Has Been Summoned; Run...")
08    local CrimGod = true
09 
10    -- KONO DIO DA
11 
12    if CrimGod == true then
13local sound1 = game.Workspace.ChargeUp
14 
15 
View all 34 lines...

end end

01    local tweenService = game:GetService("TweenService")
02    local part = game.Workspace.Part
03    local tweeningInformation = TweenInfo.new(
04 
05    0.5, --length
06    Enum.EasingStyle.Cubic, --Easing Style
07    Enum.EasingDirection.InOut,
08    0, --Times repeated
09    false, --Reverse or no?
10    0 -- delay for tween
11    )
12 
13    local partProperties = {
14 
15        Size = Vector3.new(877.04,149.27,80.24);
View all 40 lines...

end

01    local tweenService = game:GetService("TweenService")
02    local part = game.Workspace.CrimEXP
03    part.BrickColor = BrickColor.new("Crimson")
04    local tweeningInformation = TweenInfo.new(
05 
06    0.5, --length
07    Enum.EasingStyle.Cubic, --Easing Style
08    Enum.EasingDirection.InOut,
09    0, --Times repeated
10    false, --Reverse or no?
11    0 -- delay for tween
12    )
13 
14    local partProperties = {
15 
View all 43 lines...

Answer this question