Hello guys , i am trying to test some stuff with remote events.
I use a npc and a proximity prompt , once proximity prompt gets triggered it fires the server.
Howeever it doesnt seem to work.
ProximityPrompt Script
local talkEvent = game.ReplicatedStorage.GuiEvents.BotTalkEvent
script.Parent.Triggered:Connect(function()
talkEvent:FireServer()
end)
Server Script (in replicated storage)
script.Parent.OnServerEvent:Connect(function()
print("i was invoked")
end)
EDIT : I am getting no errors
Thanks for helping !
For some reasons it doesnt , this is really strange. Since FireServer() can only be called from lcoalscript it doesnt make sense.
This is true thanks , but turns out it wasnt really the issue.
To conclude it turns out ProximityPrompt gets treated by server so it doesnt work on local scripts? it is really strange but thanks to everyone for your help.