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

    Hopperbin messaging

    iMathRandom
    iMathRandom
    Mod


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

    Hopperbin messaging Empty Hopperbin messaging

    Post by iMathRandom Sun Jul 05, 2009 5:42 pm

    After put up and taking it back out, the message tries to do back to where it lelf off and restart
    Code:
    local player = script.Parent.Parent.Parent
    local bin = script.Parent
    local stats = player.stats
    function onSelected(mouse)
    msg = Instance.new("Message")
    msg.Parent = player
    msg.Text = "Level " .. stats.level.Value
    wait(2)
    msg.Text = "To next level : "..stats.level.Value * 1000 - stats.EXP.Value
    wait(2)
    msg.Text = "Max Health : "..stats.health.Value
    wait(2)
    msg.Text = "Money : " .. stats.money.Value
    wait(2)
    msg.Text = "Strength : " .. stats.stg.Value
    wait(2)
    msg.Text = "Defence : " .. stats.def.Value
    wait(2)
    msg:Remove()
    end

    function onDeselected()
    msg:Remove()
    end

    bin.Selected:connect(onSelected)
    bin.Deselected:connect(onDeselected)
    Earth
    Earth
    Admin


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

    Hopperbin messaging Empty Re: Hopperbin messaging

    Post by Earth Sun Jul 05, 2009 6:15 pm

    Try this.


    Code:


    local player = script.Parent.Parent.Parent
    local bin = script.Parent
    local stats = player.stats
    function onSelected(mouse)
    delay(1,function ()
    msg = Instance.new("Message")
    msg.Parent = player
    msg.Text = "Level " .. stats.level.Value
    wait(2)
    msg.Text = "To next level : "..stats.level.Value * 1000 - stats.EXP.Value
    wait(2)
    msg.Text = "Max Health : "..stats.health.Value
    wait(2)
    msg.Text = "Money : " .. stats.money.Value
    wait(2)
    msg.Text = "Strength : " .. stats.stg.Value
    wait(2)
    msg.Text = "Defence : " .. stats.def.Value
    wait(2)
    msg:Remove()
    end)
    end

    function onDeselected()
    msg:Remove()
    end

    bin.Selected:connect(onSelected)
    bin.Deselected:connect(onDeselected)



      Current date/time is Mon May 20, 2024 5:03 am