Hello! I am trying to make a plugin where you can create MeshParts and insert ID’s so it inserts them into the part when the part is created. However, I keep running into this problem that says, “Unable to assign property MeshId. Script write access is denied.” After that error, only a plain MeshPart comes out. I have no idea what this error is or does. If you guys can help, I would gladly appreciate it!
Server Script (inside GUI)
local ChangeHistoryService = game:GetService("ChangeHistoryService")
script.Parent.Info.OnServerEvent:Connect(function()
local meshPart = Instance.new("MeshPart")
meshPart.Parent = game.Workspace
print(script.Parent.MeshCustomizationFrame.MeshIDInserter.Text)
print(script.Parent.MeshCustomizationFrame.TextureIDInserter.Text)
meshPart.MeshId = "rbxassetid://"..script.Parent.MeshCustomizationFrame.MeshIDInserter.Text
meshPart.TextureID = "rbxassetid://"..script.Parent.MeshCustomizationFrame.TextureIDInserter.Text
script.Parent.RemoveGui:FireClient()
ChangeHistoryService:SetWaypoint("Mesh-part has been created.")
end)
Local Script (inside Button)
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Parent.MeshCustomizationFrame.Visible = false
script.Parent.Parent.Parent.Info:FireServer()
end)
local RE = script.Parent.Parent.Parent.RemoveGui
RE.OnClientEvent:Connect(function()
script.Parent.Parent.Parent.MeshCustomizationFrame.MeshIDInserter.Text = ""
script.Parent.Parent.Parent.MeshCustomizationFrame.TextureIDInserter.Text = ""
end)