ProximityPrompt's RemoteEvent not working

Hi! Continuing with my Job System errors:

To get my JobGui to the PlayerGui, the function starts with a ProximityPrompt Triggering, then sends a message through the RemoteEvent and the localscript picks it up. Instead, it doesn’t pick up, and I don’t know why.

Server

script.Parent.Prompt.Triggered:Connect(function(player)
	wait(.1)
	print("Triggered")
	script.Finish:FireClient(player)
	game.ReplicatedStorage.JobSystem.StartJob:FireClient(player)
end

Client

script.Parent.Finish.OnClientEvent:Connect(function(player)
	print("Triggered")
	script.Parent.Finish:FireServer()
	local gui = script.Job
	gui.Parent = player.PlayerGui
end) 

Maybe because it’s just ignoring game.ReplicatedStorage.JobSystem.StartJob:FireClient(player), or could it be something else?

Any help is appreciated.

I assume the client script is a local script somewhere where a local script can run, yes? If that’s the case, does it print “triggered” in the output and or not?

1 Like

local scripts dont run in workspace

2 Likes

It runs in the gui. I already know it can’t run in workspace. and no, it doesn’t.

game.ReplicatedStorage.JobSystem.StartJob.OnClientEvent:Connect(function(player)
print(“Triggered”)
script.Parent.Finish:FireServer()
local gui = script.Job
gui.Parent = player.PlayerGui
end)

This is honestly so weird! I’ve had this problem several times in the past week that I’ve had to completely rework how a part of my game was made. Maybe it’s something on Roblox’s end?

1 Like

In Client you don’t set player as the first parameter, because there’s no player when doing OnClientEvent (Unless you fire with 2 player objects)

What you want to do is:

local player = game.Players.LocalPlayer
script.Parent.Finish.OnClientEvent:Connect(function()
	print("Triggered")
	script.Parent.Finish:FireServer()
	local gui = script.Job
	gui.Parent = player.PlayerGui
end)
1 Like

Unless you were to use: :FireClient(player, player) lol

1 Like

Yes obviously, but in the case of the post there’s not a player on OnClientEvent. I’ll edit it so it won’t be confusing or misleading.

1 Like

Yeah, nothing comes out of the client. I really don’t see anything wrong with the system itself, and my games do not effect the outcome of it, so would it be possible if I’m setting it up wrong?

Well, let’s see if we could find any solutions if it’s regardless of roblox itself. Also would there be any alternatives to ProximityPrompt, and was the rework successful?