You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want the proximity prompt to say in a chat bubble if the user has an item in hand or not! -
What is the issue? Include screenshots / videos if possible!
The proximity prompt will only relay that it is “false”, even if it is in hand. I tried something similar to this with the same script where I wanted it to relay the name of an item back, but only worked once I dropped said item and picked it back up. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Looked through tons of threads and I am sure this is a really easy fix just I’m still pretty new and can’t seem to figure it out D:
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
Local Script (On Flashlight):
script.Parent.Equipped:Connect(function()
equip = true
print("Equipped!")
end)
script.Parent.Unequipped:Connect(function()
equip = false
print("Unequipped!")
end)
game.ReplicatedStorage.RemoteEvent:FireServer(equip)
Server Script (On Block):
local proxy = script.Parent
local talky = game:GetService("Chat")
local item = 3 --this is just for a default chat bubble, it says 3 when no item has been selected D:
proxy.Triggered:Connect(function()
print("Tada!")
talky:Chat(script.Parent.Parent, "Hi!")
wait(0.1)
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player, item2)
print(item)
item = item2
end)
talky:Chat(script.Parent.Parent,item)
end)
Any help would mean a lot!! For more specifics of why I am trying to implement this, I want to make it where an NPC can tell what item is in your hand and tell you about it! Right now though I am just trying to relay if its equipped or not, as trying to make it say the name was equally as hard D: