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