Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make item delete from player starterpack if they are not in the specific team?

Asked by 5 years ago

Help! i don't know if i did anything wrong and if you help i would be appreciated and i can learn from it :)

Yes = "Supreme Being"

function search(obj)v.Name="Fireball"then

if plr.TeamColor ~= game.Teams[Yes].TeamColor then

end

else

v:Destroy()

end

end

end

search(game.StarterPack)

1 answer

Log in to vote
0
Answered by 5 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.

Actually as I saw your script I will give you a working one. Insert this one in ServerScriptStorage.

Team = "Supreme Being"
function Find()
for _,p in pairs (game.Players:GetChildren()) do
if p.Team.Name == Team then
else
if p.Backpack:FindFirstChild("Fireball") then
p.Backpack.Fireball:Destroy()
end
if p.StarterGear:FindFirstChild("Fireball") then
p.StarterGear.Fireball:Destroy()
end
end
end
Find()

Hope it helped!

0
I also try making it a local,module and a normal script and i tried put it everywhere, but thanks for helping me i really appreciated it! NungkiceNicekung 22 — 5y
0
anyway it says Workspace.Script:14: 'end' expected (to close 'function' at line 2) near '<eof>' NungkiceNicekung 22 — 5y
Ad

Answer this question