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

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

Asked by
OFF_S4LE 127
3 years ago
Edited 3 years ago

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

0
and when you go bAck on the alive team the script enables again OFF_S4LE 127 — 3y

1 answer

Log in to vote
1
Answered by 3 years ago
Edited 3 years ago

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

1
No. You don't need to use player.Team.Name. Just player.Team emervise 123 — 3y
Ad

Answer this question