Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why does this script don't give me the "kill streak" reward?

local plr = game.Players.LocalPlayers

if plr.Killstreak.Value >1 then
	local p = game.Lighting.AC130:clone()
	p.Parent = plr.Backpack
end

I can't find what seems to be the problem

1 comment

0

Sorry I just started scripting like a few weeks ago

1 answer

✓ Accepted answer

How about checking every time it changes?

LOCALSCRIPT

local Player = game.Players.LocalPlayer --Not Plural

Player.Killstreak.Changed:connect(function()
	if Player.Killstreak.Value >= 3 then --Checks if your killstreak is bigger or equal to 3
		game.ReplicatedStorage.AC130:Clone().Parent = Player.Backpack
	end
end)

--[[I prefer ReplicatedStorage to Lighting since it's newer and probably better. Consider moving the AC130 to ReplicatedStorage]]--

2 comments

0

Omg thanks it actually works!

0

wait nvm it only works on LinkedLeaderboard

This discussion is preserved as it was. New answers, comments, and votes are closed.