Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can i change tool/parts mesh id and texture id?

When it looks like this (this is on local script what is in textbutton to screengui to startegui) it needs to change mesh id and texture id of Revolver(tool) in revolver there is a part and inside it has mesh >(texture id and mesh id) if you didnt understand and want to help me just ask okey...

local player = game.Players.LocalPlayer
local Rubys = player:WaitForChild('leaderstats').Rubys

script.Parent.MouseButton1Click:connect(function()
	if Rubys.Value >= 1000 then
		game.StarterPack.Revolver.Handle.Mesh.MeshId('rbxassetid://130099641')
		game.StarterPack.Revolver.Handle.Mesh.TextureId('rbxassetid://918792894')
   
        end
		
	
end)

im new dont judge and not a good scripter... :(

1 answer

You can't change the mesh id of a part during runtime but you can change the texture. In your case, changing the texture would look like this:

game.StarterPack.Revolver.Handle.Mesh.TextureId = 'rbxassetid://918792894'

Parentheses are to be used when calling a function. When you are setting a property, use the assignment operator rather then a function

2 comments

0

oh well one thing you have to click it

0

oh sry well i try my other way to change meash or that will mean whole tool

This discussion is preserved as it was. New answers, comments, and votes are closed.