i need your feedback of my script of proximity promt (custom) as default
Script to change custom promt to default
place it on load function
local function onLoad()
ProximityPromptService.PromptShown:Connect(function(prompt, inputType)
if prompt.Style == Enum.ProximityPromptStyle.Custom then
return
end
local gui = getScreenGui()
local cleanupFunction = createPrompt(prompt, inputType, gui)
prompt.PromptHidden:Wait()
cleanupFunction()
end)
end
this detects is it custom or no
ProximityPromptService.PromptShown:Connect(function(prompt, inputType)
if prompt.Style == Enum.ProximityPromptStyle.Custom then
return
end
as u see if custom it return
soo other things is my set up of promt
So
local function getScreenGui()
local screenGui = PlayerGui:FindFirstChild("ProximityPrompts")
if screenGui == nil then
screenGui = Instance.new("ScreenGui")
screenGui.Name = "ProximityPrompts"
screenGui.ResetOnSpawn = false
screenGui.Parent = PlayerGui
end
screenGui:WaitForChild("Prompt"):Destroy()
return screenGui
end
as u see we get screen gui
if it detect Promt with name “Promt” (default Promt name) it will be destroyed
WARNING U need change Promt name to Default for example BUT NOT Promt or it will be deleted too.
rate it please here
- Good Post i understand all!
- I understand but u can better!
- I dont understand or i think its bad!
- I dont understand anything:( its very bad!
0 voters
Im new at dev form as writer its my first post so ask me if u dont understand hope i helped u to change default promt