Change not showing to all players

So I am using a serverscript which receives the event sent when a player clicks on someone using a tool so when he does that the player ragdolls and it should show a proximity prompt that says “remove tool” but apparently it only shows to the client that has been targeted not to all players
Here is the script:

-- !strict

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local DaggeringE = ReplicatedStorage.VampireAbilities.DaggeringSystem
local Events = ReplicatedStorage:WaitForChild("Events")
local RagdollEvent = Events:WaitForChild("RagdollEvent")

-- Variables
local TweenS = game:GetService("TweenService")
local Info = TweenInfo.new(
	5,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)

local InfoTable = {
	Color = Color3.fromRGB(163, 162, 165)
}
local function OnDaggering(PlrHrp, TargetHrp)
	print("Ondaggering Function")
	PlrHrp.Anchored = true
	TargetHrp.Anchored = true
end
local function OnDessicating(TargetHum)
	for i, v in pairs(TargetHum.Parent:GetChildren()) do
		if v:IsA("BasePart") then
			if v.Name ~= "HumanoidRootPart" then
				local TweenCreate = TweenS:Create(v, Info, InfoTable)
				TweenCreate:Play()
			end
		end
	end
end
local function RemoveOnDaggering(PlrHrp, TargetHrp)
	PlrHrp.Anchored = false
	TargetHrp.Anchored = false
end

local function OnDaggering2(TargetHrp, Dagger)
	for i, v in pairs(Dagger:GetChildren()) do
		if v:IsA("BasePart") then
			v.Transparency = 0
		end
	end
end
DaggeringE.OnServerEvent:Connect(function(Plr, Target, Tool)
	print("Received?")
	local PlrHrp = Plr.Character.HumanoidRootPart
	local PlayerHum = Plr.Character.Humanoid
	local TargetHrp = Target.Parent.HumanoidRootPart
	local Dagger = TargetHrp.SilverDagger
	PlrHrp.CFrame = CFrame.lookAt(TargetHrp.Position - Vector3.new(0, 0, 1.7), TargetHrp.Position)
	OnDaggering(PlrHrp, TargetHrp)
	wait(3)
	print("Ragdolling & Firing rest of the functions")
	RagdollEvent:FireClient(Players:GetPlayerFromCharacter(Target.Parent), Target, true)
	OnDessicating(Target)
	Target:TakeDamage(5)
	OnDaggering2(TargetHrp, Dagger)
	Dagger.Handle.RDagger.Enabled = true
	RemoveOnDaggering(PlrHrp, TargetHrp)
end)

What confuses me is that why? it should be showing to everyone as it’s literally serverside.

It might be that you’re using FireClient instead of FireAllClients here:

RagdollEvent:FireClient(Players:GetPlayerFromCharacter(Target.Parent), Target, true)

Not sure what you are doing locally when the event is received, but your problem might be that you’re only running it on one client. Use FireAllClients to run the same thing on all clients.

The reason why the prompt only shows to the targeted player and not to all players is because it is being fired on the client side of the targeted player only. In order to make it show to all players, you will need to use the ReplicatedStorage service to send the event to all players or you could use a RemoteEvent service to trigger the prompt on all players’ client side.

That doesn’t have anything to do with the full script since it’s a ragdolling script that fires to only the target but thanks for the reply.

I didn’t fire anything to the targeted player though? could you show me where? or what you mean?

I would ask what’s the script that’s handling the FireClient and if that script is creating/enabling the ProximityPrompt. I’m not exactly sure what most of the variables are supposed to represent, like I’m not even sure if the RDagger is the prompt or not. So, I can’t give a real concrete solution to this issue without a little more information about what’s what in the script. (If that’s okay with you)

Yeah sorry didn’t give much information

So the RDagger is the proximityprompt
this here is the local script sending the event:

local Tool = script.Parent
local Player = game.Players.LocalPlayer
local Char = Player.Character
local Mouse = Player:GetMouse()
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local DaggeringE = ReplicatedStorage.VampireAbilities.DaggeringSystem
Tool.Activated:Connect(function()
	local Target = Mouse.Target
	if not Target then return end
	local HumTarget = Target.Parent:FindFirstChildWhichIsA("Humanoid")
	if not HumTarget then return end
	if Target ~= nil then
		if HumTarget then
			print("Found our boyDagger!")
			DaggeringE:FireServer(HumTarget, Tool, Player)
		end
	end
end)

So basically I’m just making it enabled through the serverscript when the event if fired though it only shows for the stabbed target or the guy that has been targeted…My problem is that I want it to show to everyone in the game so they can be able to help him

I’m not sure if this is the problem but, what if the RDagger.ProximityPromptExclusivity was set to either 0 or 1? (In their Enum form, it’ll be OnePerButton or OneGlobally)

The ProximityPromptExclusivity is the behavior of how the proximity gets displayed throughout the game. The options are in Enum.ProximityPromptExclusivity and their behavior are as described:


  • OnePerButton – One prompt will be shown per input KeyCode.
  • OneGlobally – Only one prompt will be shown with this setting.
  • AlwaysShow – This prompt will always show when in range and visible.