This is an invisibility keybind script you can hold down and it works on my screen but when I was testing and checked the player 2 screen I was still visible. Is there any way I can change it so its invisible on someone else's screen and not visible?
--[[ Varaibles ]]--
local uis=game:GetService("UserInputService");
--[[ Main ]]--
-- pressing
uis.InputBegan:connect(function(input)
if input.KeyCode==Enum.KeyCode.E then
print("pressing the key E");
local TS = game:GetService("TweenService")
local Info = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
for _, v in pairs(script.Parent:GetDescendants()) do
if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" and v.Name ~= "LeftFoot" and v.Name ~= "RightFoot" and v.Name ~= "RightLowerLeg" and v.Name ~= "LeftLowerLeg" then
TS:Create(v, Info, {Transparency=0.9}):Play()
end
end
end
end)
-- left
uis.InputEnded:connect(function(input)
if input.KeyCode==Enum.KeyCode.E then
print("you have stopped");
local TS = game:GetService("TweenService")
local Info = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
for _, v in pairs(script.Parent:GetDescendants()) do
if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" and v.Name ~= "LeftFoot" and v.Name ~= "RightFoot" and v.Name ~= "RightLowerLeg" and v.Name ~= "LeftLowerLeg" then
TS:Create(v, Info, {Transparency=0}):Play()
end
end
end
end)

2 comments
Is this located in a localscript?
yes it's a local script