Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can i make an accessory transparent with script?

Asked by 4 years ago

its script

001local rp = game:GetService("ReplicatedStorage")
002local World = rp:WaitForChild("KingRemotes"):WaitForChild("World")
003local TweenService = game:GetService("TweenService")
004local Debris = game:GetService("Debris")
005local TEsound = game.Workspace.SFX.KC.TimeErase
006local range = 300
007local duration = 10
008local TIMEEARASEEFFECT = script.uginga
009 
010World.OnServerEvent:Connect(function(Player)
011local Stand = workspace:FindFirstChild(Player.Name.." Stand"):WaitForChild("King")
012 
013if Stand then
014    local Character = Player.Character
015    local Humanoid = Character:WaitForChild("Humanoid")
View all 182 lines...

1 answer

Log in to vote
3
Answered by 4 years ago
Edited 4 years ago

Hopefully this works for you:

01--// How does this work?
02--// It gets the children of the character (a lighter use of getdescendants), but with our checks it only gets the accessory as the 'maketransparent' value.
03--// With this value it can find the Handle and the properties of it.
04 
05 
06for _, maketransparent in pairs(Character:GetChildren()) do
07 if (maketransparent.ClassName == "Accessory") then
08       maketransparent.Handle.Transparency = 1
09    end
10end

I added explaining to the script to make sure you can understand / learn how to use this function again and can develop your progress in learning lua

0
YES IT WORKS thank you so much, i guess you are new to the site since you have 0 reputation and i respect you helping people <3 themaxogamer 58 — 4y
Ad

Answer this question