I've been at this for almost an hour now and have no idea why it doesn't work.
01 | -- clone is a model duplicated from serverstorage |
02 |
03 | for i, part in pairs (clone:GetDescendants()) do |
04 | if part.Name = = "primary" then |
05 | local prompt = Instance.new( "ProximityPrompt" ) |
06 | prompt.Name = "BoxPrompt" |
07 | prompt.RequiresLineOfSight = false |
08 | prompt.HoldDuration = 4 |
09 |
10 | prompt.Parent = part |
11 |
12 | prompt.Triggered:Connect( function (plr) |
13 | local char = plr.Character |
14 | print ( 'triggered!!!!!!!!!!' ) -- doesn't print |
15 |
16 | -- some more extra stuff that really doesn't matter |
17 | end ) |
18 | end |
19 | end |
I'm gonna go to sleep, it's almost 2am and I want to die.
read the documentation on prompts
but it worked for me so im guessing is anything called primary? like with no captials. or is it a server or client thing? try switching it to a client or server. i used server.
not sure if this might help but this worked for me
I would say just keep it as ProximityPromt instead of promt and check the console since that where printed stuff goes