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

How can I get a player's name on a surface GUI textlabel when touching a brick?

Asked by
Lacin1a 12
6 years ago

I'm building a thing where I need to get a player's name when they collide with a brick. I've tried many things but it does not work.

0
this sounds suspiciously like a request. please post some code. DinozCreates 1070 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Whenever something touches connected to a Touched event, it fires the object of the toucher, this means you can get it's parent. That means you can .Parent until you get to the root then use .Name to access the name of the toucher then set the text label to that name.

0
just because you know the answer doesnt mean you should neccesarily give it. DinozCreates 1070 — 6y
Ad

Answer this question