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

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

Asked by 4 years ago

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

0
Yes, it is possible. IdealistDeveloper 234 — 4y

Closed as Not Constructive by JailBreaker_13, matiss112233, Cynical_Innovation, IAmNotTheReal_MePipe, Leamir, and brokenVectors

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
2
Answered by 4 years ago

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

Ad