Hello,
I have this script below which whitelists who can trigger a function with the KeyCode
T. This script works, however there are a few issue.
- When players type in the Roblox chat something with “t,” the function activates.
Can someone help me alter this script so this problem is fixed?
UserInputService.InputBegan:Connect(function(Key)
if Player.Team == game.Teams["On-Duty"] then
if Key.KeyCode == Enum.KeyCode.T then
ChangeActive()
end
end
end)
EDIT: I found out how to team-lock it. Still having the Roblox chat issue.