Hello. I’m attempting to make a ProximityPrompt change the properties of a union I made, once triggered. However, the script doesn’t seem to do anything. Here is the code
local egg = game.Workspace.EggsAlreadySpawned:WaitForChild("egg0809")
script.Parent.Triggered:Connect(function()
egg.Transparency = 0
egg.CanTouch = true
egg.CanCollide = true
egg.Attachment.ParticleEmitter.Enabled = true
end)
3 Likes
Is the Triggered event firing? It seems like it would work. Try adding a print() command so you can see it. Another possible solution is that you are referencing the wrong egg or proximity prompt.
Just tried it. For some reason, it did not print. The egg and proximitypromt are correct as well.
I used to have problems with ProximityPrompts before, including them just not firing, but not when it’s the right one being referenced.
As a debugging test, I used to change one of the proximity prompt’s object / action text just to make sure they are the right one. Then, when I’m in game testing, the text would have changed or not. Have you tried this?
1 Like
Is this in a Script or Local script?
If it’s a local script, then the script needs to be located in either StarterGui, ReplicatedFirst, or StarterPlayer
3 Likes
Yes, it was indeed a LocalScript. It works now. Thank you for helping me!
1 Like