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脚本中。如果创建本地脚本文件,则仅在用户设备上进行更改。要在本地脚本中运行服务器连接,您可以查看与的通信路径。它的“为其他用户同步”是什么意思?其他用户是否看到该颜色,或者该颜色是否应用于所有玩家?