Personal card ID with surface GUI having a problem

I have an idea then. Just put the card in StarterPack and put a normal script inside of it. Then, connect a function that activates when the tool is equipped, that will get the player thanks to the character, and there, the info.

That’s what I have done :confused:
I don’t know what else to do

What else should I try?
Btw thank for trying to help!

No, what have you done its a function that activates when the player joins, not when the tool is equipped:

In this case the script is inside the tool, not inside the part thats inside the tool

script.Parent.Equipped:Connect(function()
local player = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
if player then
script.Parent.Card.SurfaceGui.Text = player.Name
end
end

This script also covers if the card is dropped and other player grabs it.

He means a SurfaceGui, not a GUI in the PlayerGui.

Now everyone’s card is showing one player info

Make sure the script is inside the tool. Keep in mind im not using your script location

I literally removed my post before you even said that

Local or Server, it should work either way, just that you don’t need to use a PlayerAdded event as that’ll fire for every Player that joins the game depending on how much players there are

--LocalScript example inside the Tool
local Player = game.Players.LocalPlayer
local Tool = script.Parent

Tool.Equipped:Connect(function()
    Tool.Card.SurfaceGui.Text = Player.Name
end)

Yeah I know, I have done that, Also thank for reminding!

Is not that making everyone card be nil except the player’s card?

Oh, right, also make sure its not a localscript

LocalScripts can work if they’re parented inside Tools

Plus it’d only affect the client-side only

But I want it to replicate. :confused:

Yes i know that, what i mean is that the player will be able to see their card info, cool. But what about others cards? That player will see them as nil.

1 Like

Didn’t see the replication part whoops

Fair enough, a regular ServerScript should work

I wonder if he fixed it yet. I don’t think there is any issues

It won’t work on LocalScripts…

Forget the script I sent, use @TDtheTV’s script or you can use RemoteEvents to change the SurfaceGui that way if you want to do it that way instead?

I tried, Nothing is working oof

Could you send a screenshot of the current card tool hierarchy please?