When the player clicks, the script is suppose to change the texture of a meshpart, but when the button is clicked, nothing happens. Any Idea Why?
SkinId = "rbxassetid://633490575" Player = game.Players.LocalPlayer Character = Player.Character Aug = Character:WaitForChild("Aug") Carbon = script.Parent.Parent.Parent.Parent.Parent.Skins:WaitForChild("carbon") script.Parent.MouseButton1Click:connect(function() if Carbon == true then print("Skin Applied") Aug.TextureID = SkinId end end)
You made a error with carbon. There are no value's in carbon. U should use this.
SkinId = "rbxassetid://633490575" Player = game.Players.LocalPlayer CarbonSkinApplied = false Character = Player.Character Aug = Character:WaitForChild("Aug") Carbon = script.Parent.Parent.Parent.Parent.Parent.Skins:WaitForChild("carbon") script.Parent.MouseButton1Click:connect(function() if CarbonSkinApplied == false then print("Skin Applied") CarbonSkinApplied = true Aug.TextureID = SkinId end end)
You already added the function "WaitForChild" . And the function doesn't return a true or false. So u better just make ur own value's, and add the "WaitForChild" just with the value's.