Roblox Central

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Roblox Central

Discussion for all things Roblox. (roblox.com)

Welcome to the new forum! Any suggestions you have are greatly appreciated.
WARNING: Before referring anyone to this website, Please read this topic

2 posters

    Debounce FAIL!

    iMathRandom
    iMathRandom
    Mod


    Posts : 66
    Join date : 2009-06-21
    Location : Ohio

    Debounce FAIL! Empty Debounce FAIL!

    Post by iMathRandom Wed Aug 26, 2009 2:06 pm

    WTF?

    Code:

    function KeyDown(key)
    key=key:lower()
    DB=false
    if (key=="t") then
    if DB == false then
    DB=true
    p=Instance.new("Part")
    p.Parent=player.Character
    p.BrickColor=BrickColor.Blue()
    p.CanCollide=false
    p.Anchored=false
    p.Transparency=0.5
    p.Reflectance=0.2
    p.Shape="Ball"
    p.Size=Vector3.new(2, 2, 2)
    p.TopSurface="Smooth"
    p.BottomSurface="Smooth"
    m=Instance.new("SpecialMesh")
    m.Parent=p
    m.MeshType="Sphere"
    FON(player.Character)
    p.CFrame=player.Character.Torso.CFrame
    for i=1, 30 do
    m.Scale=m.Scale+Vector3.new(0.1, 0.1, 0.1)
    wait()
    end
    player.Character:MoveTo(Vector3.new(37.5, 3, -7))
    for i=1, 30 do
    m.Scale=m.Scale-Vector3.new(0.1, 0.1, 0.1)
    wait()
    end
    p:Remove()
    FOFF(player.Character)
    DB=false
    end
    end
    end
    Earth
    Earth
    Admin


    Posts : 402
    Join date : 2009-06-18
    Location : According to my IP address: Topeka, Kansas.

    Debounce FAIL! Empty Re: Debounce FAIL!

    Post by Earth Wed Aug 26, 2009 3:30 pm

    Whenever a key was pressed DeBounce reset...

    Define debounce outside of the function.

    Code:

    DB=false
    function KeyDown(key)
    key=key:lower()
    if (key=="t") then
    if DB == false then
    DB=true
    p=Instance.new("Part")
    p.Parent=player.Character
    p.BrickColor=BrickColor.Blue()
    p.CanCollide=false
    p.Anchored=false
    p.Transparency=0.5
    p.Reflectance=0.2
    p.Shape="Ball"
    p.Size=Vector3.new(2, 2, 2)
    p.TopSurface="Smooth"
    p.BottomSurface="Smooth"
    m=Instance.new("SpecialMesh")
    m.Parent=p
    m.MeshType="Sphere"
    FON(player.Character)
    p.CFrame=player.Character.Torso.CFrame
    for i=1, 30 do
    m.Scale=m.Scale+Vector3.new(0.1, 0.1, 0.1)
    wait()
    end
    player.Character:MoveTo(Vector3.new(37.5, 3, -7))
    for i=1, 30 do
    m.Scale=m.Scale-Vector3.new(0.1, 0.1, 0.1)
    wait()
    end
    p:Remove()
    FOFF(player.Character)
    DB=false
    end
    end
    end

    P.S. MEELO RULES!
    iMathRandom
    iMathRandom
    Mod


    Posts : 66
    Join date : 2009-06-21
    Location : Ohio

    Debounce FAIL! Empty Re: Debounce FAIL!

    Post by iMathRandom Wed Aug 26, 2009 5:50 pm

    Havn't tested taht yet, but it also doesn't work online, the KeyDown. It's in a Local script inside a Hopperbin.

    Also, I agree that Meelo rules.
    Earth
    Earth
    Admin


    Posts : 402
    Join date : 2009-06-18
    Location : According to my IP address: Topeka, Kansas.

    Debounce FAIL! Empty Re: Debounce FAIL!

    Post by Earth Thu Aug 27, 2009 10:59 am

    Meelo stop messin wif ma posts.
    iMathRandom
    iMathRandom
    Mod


    Posts : 66
    Join date : 2009-06-21
    Location : Ohio

    Debounce FAIL! Empty Re: Debounce FAIL!

    Post by iMathRandom Thu Aug 27, 2009 1:35 pm

    I tested the new Bedounce and again, it only works in solo. Does it need to go into a normal script?
    Earth
    Earth
    Admin


    Posts : 402
    Join date : 2009-06-18
    Location : According to my IP address: Topeka, Kansas.

    Debounce FAIL! Empty Re: Debounce FAIL!

    Post by Earth Thu Aug 27, 2009 2:30 pm

    Local....

    I think.
    iMathRandom
    iMathRandom
    Mod


    Posts : 66
    Join date : 2009-06-21
    Location : Ohio

    Debounce FAIL! Empty Re: Debounce FAIL!

    Post by iMathRandom Thu Aug 27, 2009 3:24 pm

    It's in a local right now.

    Sponsored content


    Debounce FAIL! Empty Re: Debounce FAIL!

    Post by Sponsored content


      Current date/time is Wed May 01, 2024 10:01 pm