How to refresh a character locally

  1. What do you want to achieve?
    I have made a thermal system that changes every player to a bright neon and removes their accessories so it gives that “Glow” which works great, however when the player deactivates the goggles the players should return to normal.

  2. What is the issue?
    I cannot figure out what functions or methods I can use however, in order to make a near flawless transition from these bright neon figures to their plain old avatar locally.

  3. What solutions have you tried so far?
    Ive tried messing with remote events, and GetHumanoidDescriptionFromUserId() but I havent had any luck.

You could add a highlight to all the players, then remove them.

How would that load their original avatar?

No, so instead of your original idea, just add a highlight to the characters, and then when you’re done, then delete the highlight

But it doesn’t give the nice glow like neon parts

You could do something like this

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")

local LocalPlayer = Players.LocalPlayer

local Character = LocalPlayer.Character
if not Character then
	Character = LocalPlayer.CharacterAdded:Wait()
end

local OtherStuff = Instance.new("Folder")

local PreviousProperties = {}

local Goggles = false
function Update()
	if Goggles then
		for i, v in Character:GetChildren() do
			if v:IsA("BasePart") then
				PreviousProperties[v] = {Material = v.Material}
				v.Material = Enum.Material.Neon
			elseif not v:IsA("Humanoid") and not v:IsA("Script") then
				v.Parent = OtherStuff
			end
		end
	else
		for i, v in Character:GetChildren() do
			if PreviousProperties[v] then
				for property, value in PreviousProperties[v] do
					v[property] = value
				end
			end
		end
		for i, v in OtherStuff:GetChildren() do
			v.Parent = Character
		end
	end
	Goggles = not Goggles
end

LocalPlayer.CharacterAdded:Connect(function()
	task.wait()
	Update()
	Goggles = not Goggles
end)

script.Parent.MouseButton1Click:Connect(Update)
1 Like

Tables did up being the solution, had to tweak the program quite a bit for my case but it worked nonetheless. Thank you.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.