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

when clicked the buttons dont work?

Asked by 10 years ago

this is my script everythings working fine only when i press the buttons they dont work

game.Players.PlayerAdded:connect(function(plr)
    sg = Instance.new("ScreenGui",plr.PlayerGui)
    sg.Name = "Menu Gui"
    fr = Instance.new("Frame",sg)
    fr.Size = UDim2.new(0.994, 0, 0.991,0)
    fr.Position = UDim2.new(0.002, 0,0.004, 0)
    fr.BorderSizePixel = 1
    fr.Active = true
    fr.ZIndex = 1
    fr.Name = "Menu"
    fr.Style = "Custom"
    archer = Instance.new("ImageButton",fr)
    archer.BorderSizePixel = 1
    archer.Image = "http://www.roblox.com/asset/?id=147172117"
    archer.Name = "Archer button"
    archer.Position = UDim2.new(0.02,0, 00.2, 0)
    archer.Size = UDim2.new(0.3,0,0.5,0)
    warrior = Instance.new("ImageButton",fr)
    warrior.BorderSizePixel = 1
    warrior.Image = "http://www.roblox.com/asset/?id=117293269"
    warrior.Name = "Warrior Button"
    warrior.Size = UDim2.new(0.3,0,0.5,0)
    warrior.Position = UDim2.new(.35,0,.2,0)
    mage = Instance.new("ImageButton",fr)
    mage.Name = "Mage button"
    mage.Size = UDim2.new(0.3,0,0.5,0)
    mage.Position = UDim2.new(0.67, 0,.2,0)
    mage.Image = "http://www.roblox.com/asset/?id=77523689"
    mage.MouseButton1Click:connect(function(Player)
        staff = game:GetService("Lighting").Magicstaff:clone(Player.Backpack)
        sg:Destroy()
    end)
    archer.MouseButton1Click:connect(function(Player)
        bow = game:GetService("Lighting").Bow:clone(Player.Backpack)
        sg:Destroy()
    end)
    warrior.MouseButton1Click:connect(function(Player)
        sword = game:GetService("Lighting").LinkedSword:clone(Player.Backpack)
        sg:Destroy()
    end)
end)

0
Does `clone` have a parameter? NoahWillCode 370 — 10y
0
if u mean have i put the objects in lighting then i have done it stackyjack 0 — 10y

Answer this question