Roblox username on card tool

Heyo,

I would like to know how and if it is possible to display (using a surface GUI) on a card tool.

So it would be a card with the player his/her name on it. This is not a tool in starterpack by the way.

I have not set up any code yet as I don’t know how to start.

I hope someone can help or explain (to) me how to do this.

Thanks,

AirplaneFreak303

Just take the name of the player’s character model or Player Instance inside of Players.

I am not that advanced yet, could you explain how to get this?

If you can show us your code so far I could help but this is basically what you need to do. This code won’t work since it does not match full syntax.

TextLabel.Text = <Player>.Name

Sure, the code I currently have is a normal script:

local character = script.Parent.Parent.Parent.Parent.Parent.Parent
script.Parent.Text = character.Name```

The tool will be placed in serverstorage.

Assuming that the card tool looks something like this: image

This is how I would do it

local Tool = script.Parent
local Character = Tool.Parent -- If character carries tool, the tool's parent is the character
local Text = script.Parent.Handle.SurfaceGui.TextLabel

Tool.Changed:Connect(function() -- So when the tool changes, the function starts
	Text.Text = ""..Character.Name -- The text becomes the character's name
end)

So the card’s text would be the player’s name when they hold it.

1 Like