I want to make a hat catalog but the Insert Service isn’t working right.
LocalScript:
local E = script.Parent:GetChildren()
local Player = game.Players.LocalPlayer
local Event = game.Workspace.HatEvent
for i = 1,#E do
if E[i]:IsA("ImageButton") then
E[i].MouseButton1Click:Connect(function()
local HatNum = tonumber(E[i].Name)
Event:FireServer(HatNum)
end)
end
end
Script:
local Event = game.Workspace.HatEvent
Event.OnServerEvent:Connect(function(Player, HatNum)
print(Player, HatNum)
local p = game:GetService("InsertService"):LoadAsset(tonumber(HatNum))
p.Parent = workspace
p:makeJoints()
local c = p:getChildren()
for i = 1,#c do
c[i].Parent = Player.Character
end
p.Parent = nil
end)
It keeps saying “HTTP 403 (Forbidden)” on line 5 in the script.
