Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is it possible to make a click system where a player clicks on another player?

So I'm making a flight attendant serving system for myself and a friend, and I want to have it be click based, where the flight attendant clicks on a player, and said player is selected so food can be handed to them, how do I script the mouse function where if I click a player and the player is selected, I would put code here but it's a mess even though I wrote it a week ago and it doesn't work anymore somehow. So to sum it up, how do I tell when a player's mouse is hovering over a player, and when they click, the player is saved in an objectvalue, that's all ok bye

1 comment

0

Yes, it is possible.

1 answer

✓ Accepted answer

use that so i think u are not so good at scripting? no Anyways

This is The Code:

local Mouse = Player:GetMouse() -- This gives the mouse

Mouse.Button1Down:Connect(function()
	if  Mouse and Mouse.Target then
		if Mouse.Target == YOUR PLAYER then -- This Line Check for Player If It Clicked
			print("LOL") -- SO Put What U Want Here
		end
	end
end)

IF u want any help for ur game i can help u

This discussion is preserved as it was. New answers, comments, and votes are closed.