I cant change my meshparts texture within a script

Ive been creating a game where you can type in a ID and it will work on a meshpart, problem is it wont load and comes up blank

My local script is:

script.Parent.MouseButton1Click:Connect(function()
	local close = script.Parent.Parent.Closed.Text
	local open = script.Parent.Parent.Open.Text
	
	close = string.gsub(close, "  ", "")
	open = string.gsub(open, "  ", "")
	
	game.ReplicatedStorage.Skin:FireServer(open, close)
end)

and my server script service script is:

game.ReplicatedStorage.Skin.OnServerEvent:Connect(function(plr, nrml, mth)


	local closedid = "http://www.roblox.com/asset/?id="..nrml
	local openid = "http://www.roblox.com/asset/?id="..mth

local closedg = plr.PlayerGui.ScreenGui.Frame.ViewportFrame.Model.Closed
local openg = plr.PlayerGui.ScreenGui.Frame.ViewportFrame.Model.GremlinGreen

closedg.HumanoidRootPart.TextureID = closedid
closedg.Head.TextureID = closedid
closedg.LeftLeg.TextureID =closedid
closedg.RightLeg.TextureID = closedid

openg.HumanoidRootPart.TextureID = openid
openg.Head.TextureID = openid
openg.LeftLeg.TextureID =openid
	openg.RightLeg.TextureID = openid
	
	print(closedid)
	print(openid)
	end)

Im getting no errors at all and this in my output : 02:28:52.929 http://www.roblox.com/asset/?id=13367275713 - Server - Script:22

Try these to "rbxassetid://"..nrml and "rbxassetid://"..mth

2 Likes

I agree with amora
That is what I would’ve said roblox doesn’t normally do https and stuff unless you’re using https service

1 Like

I just tried that and had the same problem but with this output:

  14:59:11.017  rbxassetid://8821060194  -  Server - Script:21
  14:59:11.017  rbxassetid://8821060194  -  Server - Script:22