#how to change player's material using script

41 messages · Page 1 of 1 (latest)

main narwhal
#

What do u mean

#

@thin frigate

#

Okay that's easy

#

Lemme me make a script for u

#

Wait

#

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:wait()

for _, part in pairs(character:GetChildren()) do
if part:IsA("BasePart") then
part.Material = Enum.Material.Glass
end
end

#

Put it on StarterPlayerScripts As a Local Script

#

Oof

#

I guess im still new ro coding lua

#

:/

#

Wait lemme try again

#

Hmm

#

I think so

#

Hey what error were u occuring

#

When u ran the script

#

Ok lemme fix it

#

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()

for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.Material = Enum.Material.Glass
end
end

#

Bruv

#

Wait

#

New error?

#

Ok

#

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()

wait(1)

for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.Material = Enum.Material.Glass
end
end

#

Now try

#

Finally lol

warped skiffBOT
#

studio** You are now Level 7! **studio

main narwhal
#

U can try this script too it that has error in the future

#

game.Players.PlayerAdded:Connect(function(player)
local character = player.Character or player.CharacterAdded:Wait()

wait(1)

for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.Material = Enum.Material.Glass
end
end
end)

#

Put it as a script in ServerScriptService

#

It will make all the player's character meterial to glass

#

Np

#

And dont mind me asking why are u making such game lol

#

Lol

#

What u mean wey

#

Wet*

#

Like wt clothes?

#

Wet*

fervent flint
#

I guess you could put on some decals on the body and they'll overlay with the shirt

thin frigate
# main narwhal game.Players.PlayerAdded:Connect(function(player) local character = player.Cha...

u know u could of done a Table for all Materials
then do a table.insert
then u could of done this and make a Module that has
a lot of things like a Convert Number to String which means 1k and so on
BrickColor Checker and otherslua local Tables = {} function Tables.Material() local Materials = {} -- where All Materials for i = 1,20 do -- 20 is a example i dont know how many Materials they are table.insert(Materials) end function Tables.Colors() --Table to handle Colors end function Tables.Convert() -- Table To Handle if Number >= Number then Divids end function Tables.BrickColors() --Table to handle Colors for Parts end return Tables

main narwhal
#

I haven't learned Tables yet 🥲🥲

thin frigate
#

It’s good to start learning

thin frigate