I’ve created a button GUI that gives you a specific face when you press it, but for some reason this change is only noticeable by the local player who pressed it, for instance if two players are in a server and player 1 changes his face, player 2 will always see the basic smile face but it will work correctly on player 1’s end. I don’t know how to fix this…
player = game.Players.LocalPlayer
local function onButtonActivated()
if toggled == false then
button.BackgroundColor3 = Color3.fromRGB( 170 , 255 , 127 )
toggled = true
player.Character.Head.face.Texture = "rbxassetid://22626010"
end
end
script.Parent.Activated:Connect(onButtonActivated)
Here I created this for you. Youll need to put the server script in the ServerScriptService and the local script in the gui you made. Also make a remote event and name it ChangeFace and put it in replicatedstorage.
player = game.Players.LocalPlayer
local function onButtonActivated()
game.ReplicatedStorage.ChangeFace:FireServer()
script.Parent.Activated:Connect(onButtonActivated)
SERVER:
game.ReplicatedStorage.ChangeFace.OnServerEvent:Connect(function(player)
if toggled == false then
button.BackgroundColor3 = Color3.fromRGB( 170 , 255 , 127 )
toggled = true
player.Character.Head.face.Texture = "rbxassetid://22626010"
end
end
This is not tested so let me know if you have any problems. All you should have to do is add the "end"s in both scripts. Also if it does work, mark it as the solution