Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Gui Is Not Working?

Asked by 8 years ago

**What I Want ** : When you click the button if the model does not have the stated shirt Id then it will be destroyed and will create the shirt Id, But it dosen't work as seen.

ScriptIt's a local script in a Gui Button Btw

Subject = game.Workspace.Noob
Select = script.Parent.Parent.Selected
Player = Subject
Character = Subject
module3D = require(script.Parent.Parent.Parent.Parent.Parent.Module3D)
guy = workspace.Noob
Model = game.Workspace.Camera:WaitForChild("Item")
Thing  = Model:FindFirstChild("Shirt")


function Check()

    if Model:FindFirstChild("Shirt") then
         if Model.Shirt.ShirtTemplate == "http://www.roblox.com/asset/?id=201164991"
        then

        else
            Model:Destroy() 
        end

else

    Model:Destroy() 
    end

end



script.Parent.MouseButton1Down:connect(function()

if Character:findFirstChild("Shirt") then
Character.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=201164991"
else
local Shirt = Instance.new("Shirt")
Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=201164991"
Shirt.Parent = Character
end 
script.Parent.Parent.Parent.Parent.Parent.LocalScript.Disabled = true
wait(.5)
script.Parent.Parent.Parent.Parent.Parent.LocalScript.Disabled = false
wait(.5)
Check()



end)

Problem It dose not change the shirt Id, nor deleted the model.

0
All heirarchy is correct btw TheTermaninator 45 — 8y
0
Is there a Humanoid inside the "Subject"? TheHospitalDev 1134 — 8y
0
yes TheTermaninator 45 — 8y
0
no errors TheTermaninator 45 — 8y
0
make a bunch of print debugs and try again. Nickoakz 231 — 8y

Answer this question