of     1   

ferano
#182900184Tuesday, February 02, 2016 10:57 PM GMT

So I have this as a local script in the GUI, this script is supposed to show the name of the weapon if and when a weapon is equipped. However I keep receiving the error: " Players.Player1.PlayerGui.Weapon Display.LocalScript:10: bad argument #1 to 'tostring' (value expected)" I would like so help fixing this please, the script is: local function GetWeaponEquipped() for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do if v:isA("Tool") then return v.Name end end end print (GetWeaponEquipped()) local WepName = script.Parent.Frame.Text.Equipped WepName.Text = GetWeaponEquipped()
ferano
#182900355Tuesday, February 02, 2016 11:00 PM GMT

bump
ferano
#182906222Wednesday, February 03, 2016 12:35 AM GMT

Bump2
llaserx
#182906295Wednesday, February 03, 2016 12:36 AM GMT

ferano
#182906421Wednesday, February 03, 2016 12:37 AM GMT

Thanks, I will try that when I get home.
ferano
#182909660Wednesday, February 03, 2016 1:24 AM GMT

That showed progress, however it led to the error message: "Players.Player1.PlayerGui.Weapon Display.LocalScript:12: attempt to concatenate a nil value"
LilMcManiac
#182909890Wednesday, February 03, 2016 1:28 AM GMT

while wait() do if GetWeaponEquipped() then WepName.Text = ""..GetWeaponEquipped() end end
ferano
#182910240Wednesday, February 03, 2016 1:33 AM GMT

Thanks.

    of     1