Help with local script

local script inside StarterPlayerScripts

local Plrs = game:GetService("Players")
local RemoteEvent = game.ReplicatedStorage:WaitForChild("TimeQuest")
local player = Plrs.LocalPlayer

local Wins = player:WaitForChild("leaderstats").Wins -- Replace this with your value

Wins:GetPropertyChangedSignal("Value"):Connect(function() -- you can also use TimePlayed:GetPropertyChangedSignal("Value"):Connect(function()
	
	if Wins.Value >= 5 then
		
		RemoteEvent:FireServer() 
	end
	end)

what do you exactly need help for?

I dont rly know what the issu i think its just dont work the event

is there any error?
what is not working??

I dont see any error.
[max charr[

There may be an error in the script that handles the event, can you show us the script that receives the remote event?

wait nvm the problem its not in the script i sent the problem from there
script in ServerScriptService

local RemoteEvent = game.ReplicatedStorage:WaitForChild("ThirdQuest") -- same thing. make this your event name

local cooldown = false

RemoteEvent.OnServerEvent:Connect(function(plr) -- you can keep the "plr" in if you want to change things for the player
	if not cooldown then
		cooldown = true

		local gui1 = plr.PlayerGui.HalloweenEventQuest.FrameQuest3["step 3"]
		
		local gui2 = plr.PlayerGui.HalloweenEventQuest.FrameQuest3.Finish
		
		gui1.Text = "Last Step Done!"
		
		gui2.Visible = true
		
		print("YOU done all the quests")
		
		local BadgeService = game:GetService("BadgeService")
		
		BadgeService:AwardBadge(plr.UserId, 2129196823)

		wait(0.1)

		cooldown = false

	elseif cooldown then

		print("cooldown")

	end
end)
local RemoteEvent = game.ReplicatedStorage:WaitForChild("ThirdQuest") -- change this to whatever your remote event is called

function touched()
	RemoteEvent:FireServer() --firing server
end

local TouchedPart = game.Workspace:WaitForChild("HalloweenDropper").StuffAtHalloweenLobby.Pumpking.TriplePUmpkin

TouchedPart.Touched:Connect(touched) -- change this to wherever your part is

local script in StarterPlayerScripts

This is actually cap. There is no change in the indexing.

Didnt know this, always thought it just didnt work, good to know!

I recommend doing this separately, when the Event is fired, it may not know what it is. (Especially if it was specified outside the Event)