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

How do i make a script disable for a certain team?

Trying to make 2 scripts disable when your on a certain team and for the other team the script still works

the scripts I want to disable:

repeat wait() until game.Players.LocalPlayer.Character
local hum = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")

hum.Jumping:Connect(function()
	wait(1)
    hum.Health = 0
end)

other script:

local player = game.Players.LocalPlayer

local StarterGui = player.PlayerGui
local UserInputService = game:GetService("UserInputService")
UserInputService.JumpRequest:Connect(function()
	StarterGui.ScreenGui.Frame.Visible = true
	wait(6)
	StarterGui.ScreenGui.Frame.Visible =  false
end)

so basically i want it so when your on the "died" team these scripts are disabled for only that team. and the people in the "alive" team still have the script working this is way too complicated for me, a beginner.

these scripts are all in starter player scripts as local scripts

1 comment

0

and when you go bAck on the alive team the script enables again

1 answer

✓ Accepted answer

You would define the player and then run if player.Team.Name == “” then end This should work

1 comment

1

No. You don't need to use player.Team.Name. Just player.Team

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