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
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?
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?
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)
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?