Is this examine script theoretically possible?
Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
I'm trying to make a script that will make it so that when a player right-clicks any part with an "examine" intValue in it, a box pops up that has text in it. I've been trying to do this but with no luck. Here's what I have so far but I may be doing the completely incorrect thing to make this happen. Am I going in the right direction? Also this script is inside an importer script that puts this script into PlayerScripts when a player enters the game.
1 | local sGui = script.ScreenGui |
3 | local player = game.Players.LocalPlayer |
4 | local mouse = player:GetMouse() |
6 | local function onRightClick() |
7 | local targ = mouse.Target |