Is there a way I can replace the default UI in ProximityPrompts with text in a ScreenGUI? I’d have to change some properties but I just want to know if its possible (and it if it, help would be appreciated).
It’s definitely possible. I don’t know about changing the actual GUI, because that’s a roblox object, but using some already provided functions like camera:WorldToScreenPoint()
You could definitely create your OWN billboardgui using a screengui. I don’t know why you would want to, but I’m rooting for you
You could also determine the size of it, of course if it scales that is, based off the distance between the camera and the part.
https://create.roblox.com/docs/reference/engine/classes/Camera#WorldToScreenPoint
I was just about to append my comment about that. You would need to figure out if the position it provided was on screen or not.
Yeah sorry for not clarifying (although i might need to use this eventually) but I meant to ask if I could use the PromptShown
function to have a UI show locally whenever a player is near a prompt
Looks like PromptShown can only be used from a localscript, so something like this should work:
local prompt = game.Workspace.Part.ProximityPrompt
local plr = game.Players.LocalPlayer
prompt.PromptShown:Connect(function(inputType)
plr.PlayerGui.ScreenGui.Enabled = true -- replace with your screen gui
end)
prompt.PromptHidden:Connect(function(inputType)
plr.PlayerGui.ScreenGui.Enabled = false -- also replace with your screen gui
end)
A ProximityPrompt with it’s Style set to Custom will not render any UI for that prompt. Using ProximityPromptService and various ProximityPrompt functions, you could easily create your own.
this took a lot less brain power than i expected lol thanks
i basically just got a proximityprompt customizer and made it all transparent, making it look like the prompt is on screen (cool right)
final result:
https://streamable.com/ecnev5
Oh damn, never even thought about doing something like that. Arguably a faster method since proximity prompts are native, I normally just use RunService and set the ScreenGui.Enabled property to (HumanoidRootPart.Position-target.Position) <= dist, since that returns a bool.
Anyway good thinking using a proximity prompt, I’ll have to do this in the future.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.