Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Alright, new post. FireClient only fires for a specific player ?, read desc

Asked by 2 years ago
Edited 2 years ago

So I have a teleporter that teleports a player when touched. I want this loading gui i made to appear on a remote event that activates when the player touches the part. This issue is that with FireAllClients, it happens for everyone, which I want, but at the same time, which I don't want. I want to use FireClient, but it only does the event for the first person that touches the teleporter. For everyone else, it just skips the FireClient part. I want it so that when a different person touches it, it also does the event for them as well. Here's the code btw

local door = script.Parent local repstorage = game:GetService("ReplicatedStorage") local event = repstorage.EnteringBuilding local db = false --Debounce script

game.Players.PlayerAdded:Connect(function(player) door.Touched:Connect(function(part) if part and part.Parent:FindFirstChild("Humanoid") and not db then db = true print(part) print(part.Parent) event:FireClient(player) wait(2) part.Parent.LowerTorso.CFrame = script.Parent.Parent.PizzaLeave.CFrame wait(7) db = false end end) end)

1 answer

Log in to vote
0
Answered by 2 years ago

Assuming from your question,

try :FireAllClients() that does not have a player parameter at the start.

Ad

Answer this question