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

How to make clickable players?

Asked by
NordicM 77
5 years ago

I’m trying to make a game where you click a player and then the player that got clicked gets a request. I don’t know how to make a clickable player. I haven’t tried it and I can’t see any posts about this.

0
You could insert a ClickDetector into the player's torso when they join the game, or use mouse.target on the client. Hacreey 49 — 5y
0
Are you using R6 Or R15? isaacjh100 41 — 5y
0
Kinda late bruh. Thanks for the answers anyways.. NordicM 77 — 4y

2 answers

Log in to vote
0
Answered by 5 years ago

Use this script:


PlayerChar = game:GetService("Players").LocalPlayer.Character local ClickDetec = Instance.new("ClickDetector",PlayerChar.Torso) ClickDetec.MaxActivationDistance = 12 --Put here the maximum activation range for clicking on the character.

Now all you gotta do is make a GUI and script it so it appears when the ClickDetector is activated.

0
Btw if youre using R15 change the word "Torso" at line 2 for UpperTorso. kevinsoaresv 47 — 5y
0
Just make it a HumanoidRootPart and you don't need to worry about r6 r15 or r30 Gojinhan 353 — 5y
Ad
Log in to vote
1
Answered by 5 years ago

As others have suggested, use clickdetector,

but instead of setting the clickdetector's parent to a torso

i suggest you weld a block that covers the whole player, with collision and anchored set to false and transparency to 1

then put the clickdetector there

this way it will be easier to click the player

1
Setting Massless to true will also help stop the player from glitching with that block, you can also get fancier and use selection boxes. Gojinhan 353 — 5y

Answer this question