【发布时间】:2022-10-05 12:57:57
【问题描述】:
我在更改图像和文本时遇到问题,这是脚本:
--Image Change(localScript)
local Player = game:GetService("Players")
local player = game.Players.LocalPlayer
local imageLabel = script.Parent.Parent.ImageTag
local userID = player.UserId
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local content, isReady = Player:GetUserThumbnailAsync(userID, thumbType, thumbSize)
while wait() do
imageLabel.Image = content
end
--Text Change(localScript)
local textLabel = script.Parent.Parent.NameTag
local player = game.Players.LocalPlayer
while wait() do
textLabel.Text = player.Name
end
--Passport Clone(Script)
local passport = game.ReplicatedStorage.Passport
game.Players.PlayerAdded:Connect(function(plr)
if plr:IsInGroup(14472135) then
local passportClone = passport:Clone()
passportClone.Parent = game.StarterPack
end
end)
当护照被克隆时,我可以看到我的名字和图像,但其他玩家什么也看不到。
任何建议谢谢
【问题讨论】:
-
问题是什么?你期望会发生什么?实际发生了什么?你得到什么错误?
-
问题是我没有错误当护照生成时文本不会改变,图像不会改变,我不明白为什么要制作本地脚本?谢谢