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