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

The shark won't receive the tool?

The following code is a server script and there are no errors in the output. The following code will give the players a tool in replicated storage and it doesn't seem to work.

local plrs = game.Players:GetPlayers()
local teams = game:GetService("Teams")
local shark = teams:WaitForChild("Shark")
local tool = game:GetService("ReplicatedStorage"):WaitForChild("Shark Tagger")

while wait() do
	if plrs.TeamColor == shark.TeamColor then
		tool:Clone().Parent = plrs.Backpack
	end
end

1 answer

One idea.

Consider changing the following:

local plrs = game.Players:GetPlayers()
local teams = game:GetService("Teams")
local shark = teams:WaitForChild("Shark")
local tool = game:GetService("ReplicatedStorage"):WaitForChild("Shark Tagger")

while wait() do
    if plrs.TeamColor == shark.TeamColor then -- shark.TeamColor isn't a valid color. Try changing shark to a similar color.
        tool:Clone().Parent = plrs.Backpack
    end
end

I hope it will work! :D

2 comments

0

Didn't seem to work.

0

I am pretty Newbie with scripts, sorry that I couldn't do anything for you.

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