Attempting to change a players face when they join the game. Does anyone know how to access the local player in Workspace?
This is the code so far,
local player = game.Players.LocalPlayer.Character
if player:findFirstChild("Humanoid") then
player.Head.face.Texture = "http://www.roblox.com/asset/?id=4623132478"
end
It’s meant to find the player in Workspace and access their face’s decal texture. Did I write this correctly?
So, is this a local script or a script? Do you have Filtering Enabled to true or false? also, if this is a local script in workspace, it’s not going to work!
If you’re running this correctly on the client side, it may be a loading issue. I would recommend using a server script like this in ServerScriptService so that other players can see
Regardless of it being disabled in the properties, it is still set to true. Roblox has forced filtering enabled and there is no way to disable it.
@BIueMalibu local scripts cannot run in workspace. The only exception is when they’re a descendant of a players character. Local scripts only run when they’re a descendant of a player, or their character, or in replicated first.
Make this a server script and instead listen for the PlayerAdded and CharacterAdded events:
As everyone else mentioned, because it’s a local script in ServerScriptService, it won’t work.
A script-less alternative is via Studio’s Game Settings Avatar tab. You can force a face from there. However, using a script of course allows for much more customization and control in the future.
I dont know what you mean? Players get a copy of the local script, so the changes would have been applied to everyone locally. You wouldn’t see the face change on someone else, but you would for yourself.
My code replicates the changes to everyone since it is server script.
Also remember that the server has no concept of “local player” so don’t use that term in server context.