Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
tykoone -8
6 years ago
Edited 6 years ago

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

Log in to vote
0
Answered by
RayCurse 1518 Moderation Voter
6 years ago
Edited 6 years ago

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

0
oh well one thing you have to click it tykoone -8 — 6y
0
oh sry well i try my other way to change meash or that will mean whole tool tykoone -8 — 6y
Ad

Answer this question