So here’s the thing. I have actually this manuscript to do yourself invisible and it works choose a charm until…You ask an additional person to sign up with you. Due to the fact that even though you feel choose you’re invisible, come them girlfriend aren’t.Because fine it’s a neighborhood Script. OofSo is there a means to make you personality invisible to the entire server? like via an occasion or something?Has anyone done this before?

local allowed = falselocal plr = game.Players.LocalPlayerscript.Parent.Activated:Connect(function()if enabled == false thenenabled = truefor i,v in pairs(plr.Character:GetChildren()) doif v:IsA("Part") or v:IsA("MeshPart") or v:IsA("UnionOperation") thenif v.Name ~= "HumanoidRootPart" thenv.Transparency = 0.97endendif v:IsA("Accessory") thenv.Handle.Transparency = 0.97endif v.Name == "Head" thenv.face.Transparency = 0.97endend endend)
2 Likes
low0ps (low0ps) October 7, 2020, 2:58am #2
native what I can tell, your script works except it won’t replicate as result of it gift a LocalScript (as you pointed out.)

To answer your question, yes, friend would usage a RemoteEvent to achieve this effect.

You are watching: How to become invisible in roblox


notcrew (notcrew) October 7, 2020, 9:31am #3

So ns tried to invoke a server event, yet didn’t the player is still visible to other players.

This is mine codeLocalClient:

local permitted = falselocal plr = game.Players.LocalPlayerlocal char = plr.Characterscript.Parent.Activated:Connect(function()if enabled == false thenenabled = truegame.ReplicatedStorage.Invisible:FireServer(enabled)for i,v in pairs(char:GetChildren()) doif v:IsA("Part") or v:IsA("MeshPart") or v:IsA("UnionOperation") thenif v.Name ~= "HumanoidRootPart" thenv.Transparency = 0.97endendif v:IsA("Accessory") thenv.Handle.Transparency = 0.97endif v.Name == "Head" thenv.face.Transparency = 0.97endendelseif permitted == true thenenabled = falsefor i,v in pairs(char:GetChildren()) doif v:IsA("Part") or v:IsA("MeshPart") or v:IsA("UnionOperation") thenif v.Name ~= "HumanoidRootPart" thenv.Transparency = 0endendif v:IsA("Accessory") thenv.Handle.Transparency = 0endif v.Name == "Head" thenv.face.Transparency = 0endendendend)And this is what I have actually on the server

Server:

game.ReplicatedStorage.Invisible.OnServerEvent:Connect(function(plr, enabled)if permitted == false thenenabled = truefor i,v in pairs(plr.Character:GetChildren()) doif v:IsA("Part") or v:IsA("MeshPart") or v:IsA("UnionOperation") thenif v.Name ~= "HumanoidRootPart" thenv.Transparency = 0.97endendif v:IsA("Accessory") thenv.Handle.Transparency = 0.97endif v.Name == "Head" thenv.face.Transparency = 0.97endendelseif permitted == true thenenabled = falsefor i,v in pairs(plr.Character:GetChildren()) doif v:IsA("Part") or v:IsA("MeshPart") or v:IsA("UnionOperation") thenif v.Name ~= "HumanoidRootPart" thenv.Transparency = 0endendif v:IsA("Accessory") thenv.Handle.Transparency = 0endif v.Name == "Head" thenv.face.Transparency = 0endendendend)Sorry this remote occasions are fairly new to me. Can you please provide me a little more direction.


ServerScript:

local RemoteEvent = Instance.new("RemoteEvent", game.ReplicatedStorage)RemoteEvent.Name = "ChangeVisibility"local LastInvoke = local Cooldown = 5local CooldownForTrueOnly = trueRemoteEvent.OnServerEvent:Connect(function(player, value)local discovered = nilfor i,v in pairs(LastInvoke) doif v<1> == player.UserId thenFound = vendendif discovered thenif CooldownForTrueOnly thenif worth thenif tick() - Found<2> >= Cooldown thenfor i,v in pairs(LastInvoke) doif v == discovered thenv<2> = tick()endendelseprint("Visiblity Cooldown For: "..player.Name..", Time Left: "..math.ceil(Cooldown - (tick() - Found<2>)).."s")returnendendelseif tick() - Found<2> >= Cooldown thenfor i,v in pairs(LastInvoke) doif v == discovered thenv<2> = tick()endendelseprint("Visiblity Cooldown For: "..player.Name..", Time Left: "..math.ceil(Cooldown - (tick() - Found<2>)).."s")returnendendelsetable.insert(LastInvoke, player.UserId, tick())endlocal character = player.Character or player.CharacterAdded:Wait()if character thenfor i,v in pairs(Character:GetChildren()) doif v:IsA("Accessory") thenif worth then v.Handle.Transparency = 1 rather v.Handle.Transparency = 0 endelseif v.Name ~= "HumanoidRootPart" thenpcall(function()if worth then v.Transparency = 1 else v.Transparency = 0 endend)endendif v.Name == "Head" thenif value then v.face.Transparency = 1 else v.face.Transparency = 0 endendendendend)LocalScript:

game.ReplicatedStorage:WaitForChild("ChangeVisibility"):FireServer(true)wait(5)game.ReplicatedStorage:WaitForChild("ChangeVisibility"):FireServer(false)
Wow thank-you and plainly I was a long means from figuring this out.

In rule this worked, yet this is a tool which is triggered by clicking the player as soon as the tool is selected.

So I readjusted the LocalScript password to this:

local permitted = falsescript.Parent.Activated:Connect(function()if permitted == false thenenabled = truegame.ReplicatedStorage:WaitForChild("ChangeVisibility"):FireServer(true)elseif allowed == true thengame.ReplicatedStorage:WaitForChild("ChangeVisibility"):FireServer(false)endend)The result is I can manually invoke invisibility and then turn it off sometime later. However only once.Looking at your password I was thinking it’s the cooldown but it doesn’t permit a second activation even after 5 secs.Any ideas?


That seems really overcomplicated because that a simple invisibilty script.

Assuming he’s utilizing a Tool, the local script code should look favor this.

See more: Cucumber Are Pickles A Fruit Or Vegetable ? Are Pickles A Fruit Or A Vegetable

local ReplicatedStorage = game:GetService("ReplicatedStorage")local tool = script.Parenttool.Activated:Connect(function() ReplicatedStorage.Invisibility:FireServer()end)With Server manuscript code looking like this.

local ReplicatedStorage = game:GetService("ReplicatedStorage")local Invisibility = ReplicatedStorage.Invisibilitylocal invisiblePlayers = local invisibilityDebounce = Invisibility.OnServerEvent:Connect(function(player)if (invisibilityDebounce and os.clock() - invisibilityDebounce
1 prefer

*
notcrew:

elseif allowed == true thengame.ReplicatedStorage:WaitForChild("ChangeVisibility"):FireServer(false)endTry this:

Serverscript (Switched to A far Function)

local RemoteFunction = Instance.new("RemoteFunction", game.ReplicatedStorage)RemoteFunction.Name = "ChangeVisibility"local LastInvoke = local Cooldown = 5local CooldownForTrueOnly = trueRemoteFunction.OnServerInvoke = function(player, value)local uncovered = nilfor i,v in pairs(LastInvoke) doif v<1> == player.UserId thenFound = vendendif uncovered thenif CooldownForTrueOnly thenif worth thenif tick() - Found<2> >= Cooldown thenfor i,v in pairs(LastInvoke) doif v == uncovered thenv<2> = tick()endendelseprint("Visiblity Cooldown For: "..player.Name..", Time Left: "..math.ceil(Cooldown - (tick() - Found<2>)).."s")return false, Cooldown - (tick() - Found<2>)endendelseif tick() - Found<2> >= Cooldown thenfor i,v in pairs(LastInvoke) doif v == discovered thenv<2> = tick()endendelseprint("Visiblity Cooldown For: "..player.Name..", Time Left: "..math.ceil(Cooldown - (tick() - Found<2>)).."s")return false, Cooldown - (tick() - Found<2>)endendelsetable.insert(LastInvoke, player.UserId, tick())endlocal personality = player.Character or player.CharacterAdded:Wait()if character thenfor i,v in pairs(Character:GetChildren()) doif v:IsA("Accessory") thenif worth then v.Handle.Transparency = 1 rather v.Handle.Transparency = 0 endelseif v.Name ~= "HumanoidRootPart" thenpcall(function()if worth then v.Transparency = 1 rather v.Transparency = 0 endend)endendif v.Name == "Head" thenif worth then v.face.Transparency = 1 rather v.face.Transparency = 0 endendendendreturn trueendLocalscript In Tool:

local enabled = falsescript.Parent.Name = "Invisibility: Off"script.Parent.Activated:Connect(function()if permitted == false thenlocal result = game.ReplicatedStorage:WaitForChild("ChangeVisibility"):InvokeServer(true)if result == true thenenabled = truescript.Parent.Name = "Invisibility: On"elseif type(result) == "table" thenscript.Parent.Name = "Cooldown"wait(result<2>)script.Parent.Name = "Invisibility: Off"endelseif permitted == true thenlocal result = game.ReplicatedStorage:WaitForChild("ChangeVisibility"):InvokeServer(false)if result == true thenenabled = falsescript.Parent.Name = "Invisibility: Off"endendend)
1 favor