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
4 years ago
Edited 4 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:

1repeat wait() until game.Players.LocalPlayer.Character
2local hum = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
3 
4hum.Jumping:Connect(function()
5    wait(1)
6    hum.Health = 0
7end)

other script:

1local player = game.Players.LocalPlayer
2 
3local StarterGui = player.PlayerGui
4local UserInputService = game:GetService("UserInputService")
5UserInputService.JumpRequest:Connect(function()
6    StarterGui.ScreenGui.Frame.Visible = true
7    wait(6)
8    StarterGui.ScreenGui.Frame.Visible =  false
9end)

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 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 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 — 4y
Ad

Answer this question