I want to be able to make it so i can click anywhere on the part and it will take me to the seat on that part. and when i hover over the part it has like an white outline when i stop hovering the white outlines goes how do i achieve this.
2 Likes
In addition he would need to use the mouse api to find if the target is a seat with mouse.Target
3 Likes
Simple raycasting to where mouse points is enough
(I guess Mouse.Target will be enough)
Yeah simple raycasting with the mouse works as well.
1 Like
- Put a clickdetector inside of the seat
- Put a highlight inside of the seat
- Make a localscript inside of starterplayerscripts
- When Mouse Hovers over the seat’s clickdetector, enable the highlight
- When Mouse Leaves the seat’s clickdetector, disable the highlight
- When Mouse Clicks the seat’s clickdetector, use Seat:Sit(humanoid) to make the player sit on the seat.
This is exactly what you need to make what you wanted. Keep in mind this isn’t a place to get entire scripts made for you, however if you’re stuck on something, feel free to ask a follow-up question.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.