Hey! I’m trying to fire this event whenever someone interacts with a proximity prompt and enable the prompt only for the player that used it, but doesn’t fire the event, and as I’m new to using events I’m very lost, can anyone help? I don’t get a single error, and the script works as normal, but the event doesn’t fire…
the server script;
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ProxPrompt = script.Parent
local itemTemplate = script.Item
local Till = game.Workspace.GasStation.Shop.Till
local monitorScreen = Till.Monitor.Screen.SurfaceGui.Frame
local RE = ReplicatedStorage:WaitForChild("RemoteEvents")
local Event = RE:WaitForChild("TillProxPromt")
local checkoutPlayer = ""
ProxPrompt.Triggered:Connect(function(player)
checkoutPlayer = player.Name
ProxPrompt.Enabled = false
Event:FireClient(player)
print(player.Name)
(I’ve not included the rest of the script to avoid confusion as it’s not important to this question, but I can provide if needed)
the local script;
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RE = ReplicatedStorage:WaitForChild("RemoteEvents")
local Event = RE:WaitForChild("TillProxPromt")
Event.OnClientEvent:Connect(function(player)
print(player.Name)
script.Parent.Enabled = true
end)
Sorry if the answer is super simple, lol