0
pnts = script.Pants
shirt = script.Shirt
function onClicked(playerWhoClicked)
end
function GiveClothes(character)
if not character:findFirstChild("Shirt") then
shirt:Clone().Parent = character
else character:findFirstChild("Shirt"):Destroy()
shirt:Clone().Parent = character
end
if not character:findFirstChild("Pants") then
pnts:Clone().Parent = character
else character:findFirstChild("Pants"):Destroy()
pnts:Clone().Parent = character
end
end
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(char)
wait(1.12)
local plr = game.Players:findFirstChild(char.Name)
print(char.Name)
local groupid = 0 -- Id of your group
local plr = game.Players:GetPlayerFromCharacter(part.Parent)
if plr then
if plr:IsInGroup(groupid) then
if plr:GetRoleInGroup(groupId) >= 50
then GiveClothes(char)
end
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
如果你点击按钮(脚本在按钮下面,是的,还有一个ClickDetector),这个脚本应该给你一些衣服,但它只会给你衣服,如果你在一个集团中有一定的排名。Roblox OnClick clothers的提供者脚本
但目前它不工作。如何解决这个问题?
一定要包含大量的信息。简单地说,“它不起作用”不会让人想要帮助你,因为事实是任何事情都行不通。确保在输出中查找任何错误,并且如果有任何错误将其添加到您的问题! – Klink45