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

Faces won't change in my team face script?

Asked by 6 years ago

so i made a script that changes the face of the player when they are in a specific team but it won't work. help!

local plr = game.Players.LocalPlayer
local char = plr.Character
local face = char.Head.face
local vface = 1044179525
local sface = 111523405
if plr.TeamColor == "Really Red" then
    face.Texture = "rbxassetid://"..vface
elseif plr.TeamColor == "Bright Blue" then
    face.Texture = "rbxassetid://"..sface
end
0
?? hiimgoodpack 2009 — 6y
0
memz DevRolizzard 13 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Lua is case sensitive about the colors in ROBLOX. The actual colors are called "Really red", not "Really Red" and "Bright blue" instead of "Bright Blue" like you had. Make sure to look at the colors and match the names so that the capitalization is correct.

EDIT: Be sure to also add BrickColor.new() if you are using strings as color names.

local plr = game.Players.LocalPlayer
local char = plr.Character
local face = char.Head.face
local vface = 1044179525
local sface = 111523405
if plr.TeamColor == BrickColor.new("Really red") then --Changed from Really Red
    face.Texture = "rbxassetid://"..vface
elseif plr.TeamColor == BrickColor.new("Bright blue") then --Changed from Bright Blue
    face.Texture = "rbxassetid://"..sface
end
0
Hmm. This doesn't really work... But i don't see any errors. DevRolizzard 13 — 6y
0
Is this script local? BennyBoiOriginal 293 — 6y
Ad

Answer this question