#proximityPrompt to function

1 messages · Page 1 of 1 (latest)

vast sluice
#

how do i make a proximity promt trigger a function?

#
function (clickDetection)
    clickDetection.MouseClick:Connect(function()
        print("The function works")
    end)
    
end
#

i made this so far

jade sigil
#

That's a click detector, a proximity uses "triggered"? I think

#

So like proximity.triggered:Connect(function()

vast sluice
#
function (ProximityPromptTrigger)
    proximity.triggered:Connect(function()
        print("Hello world!")
    end)
    
end
#

like this?

jade sigil
#

What I don't get it

#

why not just reference the proximity prompt like local proximity= -- the proximity prompt

Then proximity.triggered: Connect(function()

#

So like

local proximity = -- where your proximity prompt is located
    proximity.triggered:Connect(function()
        print("Hello world!")
    end)
    
end
covert egret
vast sluice
#

do i put the script under the proximity promt or the object/Rig

covert egret
#

ofc you can put script in other places except workspace

vast sluice
#

oh mkay

#

gimme a sec

#

bruh i messed up sum

fluid knoll
vast sluice
#

look in my bio

#

thats my hardest achievment in scripting

#

idk what im doing

#

i gotta figure ts out

covert egret
covert egret
fluid knoll
vast sluice
#

ik how to close em

#

ohh wait that was what was wrong?

#

function(Triggered)
    proximity.Triggered:Connect(function()
        print("Hello world!")
    end)
end```
#

now i think

#

nope

covert egret
vast sluice
#

is that a yes bruh or a no bruh

covert egret
#

🤦‍♂️

#

You should read roblox docs instead of asking for help here

vast sluice
#

where do i find them

#

create?

fluid knoll
vast sluice
#

ok thats sarcasm for sure

#

BRO TS A SCRIPTING HAVEN

#

OMG

dapper harbor
#

lol

rough swallow
#

lol

vast sluice
balmy smeltBOT
#

studio** You are now Level 6! **studio

sharp dirge
#
while wait() do print("skill issue") end
vast sluice