Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Lua 在roblox中,我如何为一个用户更改_Lua_Roblox - Fatal编程技术网

Lua 在roblox中,我如何为一个用户更改

Lua 在roblox中,我如何为一个用户更改,lua,roblox,Lua,Roblox,所以我想做的是制作一个脚本,它会改变用户聊天内容的颜色,但问题是它会为其他用户同步 local GamePlays = game:GetService("Players") local GameChat = require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService")) local AdminNames =

所以我想做的是制作一个脚本,它会改变用户聊天内容的颜色,但问题是它会为其他用户同步

local GamePlays = game:GetService("Players")

local GameChat = require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))

local AdminNames = {"Road_Gamer2"}

local MarketplaceService = game:GetService("MarketplaceService")

GameChat.SpeakerAdded:Connect(function(PLRName)
    
    local Play = game.Players[PLRName]
    
    script.Parent.MouseButton1Click:Connect(function()
        
        local Speak = GameChat:GetSpeaker(Play.Name)
        
        Speak:SetExtraData("ChatColor",Color3.fromRGB(2, 152, 0))   

    end)
    
end)

如果脚本是服务器脚本,则它将复制到所有播放机。您可以在本地脚本中重新编写脚本,并将其放置在Starter Player脚本中。如果创建本地脚本文件,则仅在用户设备上进行更改。要在本地脚本中运行服务器连接,您可以查看与的通信路径。

它的“为其他用户同步”是什么意思?其他用户是否看到该颜色,或者该颜色是否应用于所有玩家?