Wins system script not working!

bolth kind of. they get one win then it teleports them to spawn. but if there is another tower and its taller i could make it so that they get 2 wins instead of 1.

should i just make a whole new topic for that?

nah dont make a new topic ill jst keep helping you. I think I understand
try this

local amountofwins = 1 -- change this to however much you want it to give

local oncooldown = false
local RS = game:GetService("ReplicatedStorage")
local label = game.StarterGui.ScreenGui.Wins.Text
local FireReplicated = true
local part = script.Parent
part.Touched:Connect(function(part)
	if part.Parent:FindFirstChild("Humanoid") then
		if oncooldown == false then
			local plr = game.Players:FindFirstChild(part.Parent.Name)
			plr.leaderstats.Wins.Value += amountofwins
			RS.GiveWins:FireClient(plr)
			
			part.Parent:MoveTo(Vector3.new(0,5,0)) --switch the coordinates to wherever you want the player to teleport
			
			oncooldown = true
			wait(1)
			oncooldown = false
		end
	end
end)

put this script in the part that gives wins

1 Like

This worked out so well TYSM!!! everythings up and running!

Thats the last thing! thanks!!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.