repeat wait() until game.Players.LocalPlayer.Character
local p = game.Players.LocalPlayer
local cd = game.StarterGui:WaitForChild("CustomizationData")
local l = script.Parent.Left
local r = script.Parent.Right
local chat = p.Character:WaitForChild('Hair') -- Created Hair Accessory with a MeshPart(Handle Inside it)
local hn = script.Parent.HNumber
local hid = {522589968,520462259}
local count = 0
function Update()
chat:WaitForChild('Handle').MeshId = "rbxassetid://"..hid[count] -- It's supposed to insert the id from the table but it doesnt works
hn.Text = count
end
r.MouseButton1Down:Connect(function()
if count >= #hid then
else
count = count + 1
Update()
end
end)
l.MouseButton1Down:Connect(function()
if count > 1 then
count = count - 1
Update()
end
end)
Anyway I tried making the Hair or Hat Customization and then comes up an error says
Unable to assign property MeshId. Script write access is restricted ? what does that means .. why I can't change the id of an MeshPart from the localscript
