I’m kind of confused on scripting something like this. How exactly would I?
You would need to use UserInputService & Connect a InputBegan function to handle that whenever the UI is showed for the person. And then disconnect it when its closed.
To open/close the UI I guess you could do a distance check or something, using magnitude of the player character position - the item’s position?
Checklist:
- Way to get what object is currently being hovered on so your able to check if the object is the desired object. ( via Userinput service, and Mouse.target)
- Spawn a GUI to mouse location with the desired GUI + offset + Selection box
- Add a interaction Click event/button press ( client sided and server sided )
1 Like