Title
ServerScript code (which I have no problem with if you need it here)
script.Parent.Touched:Connect(function(part)
game.ReplicatedStorage.FirstPlaceEvent:FireAllClients(part)
end)
What happened is that when the remote event is triggered which I have no problem with the function being triggered but the wrong thing is that this script is not working properly...
game.ReplicatedStorage.FirstPlaceEvent.OnClientEvent:Connect(function(part)
if part.Parent:FindFirstChild("Humanoid") then
local player = game.Players[part.Parent.Name]
local fpp = script.Parent.FirstPlacePlayer
local spp = script.Parent.SecondPlacePlayer
local tpp = script.Parent.ThirdPlacePlayer
local stats = player.Place
local firstPlace = stats.FirstPlace
local secondPlace = stats.SecondPlace
local thirdPlace = stats.ThirdPlace
if fpp.Text == "" and firstPlace == false and secondPlace == false and thirdPlace == false then
firstPlace = true
fpp.Text = player.Name
elseif fpp.Text ~= "" and firstPlace == false and secondPlace == false and thirdPlace == false then
secondPlace = true
spp.Text = player.Name
elseif fpp.Text ~= "" and spp.Text ~= "" then
thirdPlace = true
tpp.Text = player.Name
else
print(player.Name.."is neither first place, second or third")
end
end
end)
What happened is that it keeps saying in the output "mudathir2007 is neither first place, second or third" when I am really first to touch the brick... Please help if you do have a solution. Answers/comments are appreciated. And that's about all that what happened to this script.
Important Info:
Fire Type (FireServer, FireAllClients, FireClient): FireAllClients()
ServerScript Location: workspace.Part
Function Type (Touched, Changed, etc.) Touched
Security Mode: FilteringEnabled obviously

8 comments
Shouldn't handle touched events locally. Also, what is "player" defined as? Touched events run multiple times if it touched another part. For example, if your brick was on top of your baseplate, the baseplate would register touched events.
And OnClientEvent is localscript only, why are you using in server.
Why not just check instead of the text value the
firstPlacesecondPlaceandthirdPlacevariables? You're being inconsistent. Also what's the text offpp,spp, andtppI'll add the serverscript code in the question
ffp ssp ttp texts are "" (nothing) before being touched
The problem may lie in your conditional statements (The "if ____ then" statements) I think its the Stats.FirstPlace and stuff. If the value "firstPlace" is a Bool Value, you may need to change the conditional statement for it. Try using "if firstPlace.Value == false then"
incapaz I have no problem with the first parts of the script while ininja is right about the if then statements while it prints out I'm neither first second or third
Okay i'll try hold on