i have a gui


|TextLabel|

when i equip a weapon, i need the name to show there, i tried a few different scripts

(even changing the weapon name when equipped to see if it worked (that did) )

but i cant figure out how to get the weapon name to show in the gui

well i tried a different approach \

still didnt work

local tool = script.Parent
local Name = game.Players.LocalPlayer.PlayerGui.ScreenGui.AttackStyles.ImageLabel.WeaponName

function onEquip(mouse)
	Name.Text = tool.Name

this is a script inside the tool itself. piece of the script i didnt post changes a gui already

3 comments

1

Have a script that checks if an object was added to the player's character. If that object is a tool, then have the script change the textlabel to the name of the tool. Without an attempt at a script, we can not really help you.

0

is this a localscript

0

yea