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

How do i insert mesh id in this script?

Asked by 9 years ago
function onTouched(part)
local hu = part.Parent:findFirstChild("Humanoid")
local he = part.Parent:findFirstChild("Head")
local la = part.Parent:findFirstChild("Left Arm")
local ll = part.Parent:findFirstChild("Left Leg")
local ra = part.Parent:findFirstChild("Right Arm")
local rl = part.Parent:findFirstChild("Right Leg")
local to = part.Parent:findFirstChild("Torso")
if hu~=nil then
he.BrickColor = BrickColor.new(1013)
he.Transparency = 0.7
he.Anchored = true
la.BrickColor = BrickColor.new(1013)
la.Transparency = 0.7
la.Anchored = true
ll.BrickColor = BrickColor.new(1013)
ll.Transparency = 0.7
ll.Anchored = true
ra.BrickColor = BrickColor.new(1013)
ra.Transparency = 0.7
ra.Anchored = true
rl.BrickColor = BrickColor.new(1013)
rl.Transparency = 0.7
rl.Anchored = true
to.BrickColor = BrickColor.new(1013)
to.Transparency = 0.7
to.Anchored = true
end
end
script.Parent.Touched:connect(onTouched)

btw, the script was a ontouched freeze script. i want to add a mesh into the script. so how?

1 answer

Log in to vote
1
Answered by
Micexz 5
9 years ago

Completely depends on what you want the mesh added to.

local mesh = Instance.new("SpecialMesh",PARENT) --Change PARENT to the location you want it.
mesh.MeshId = "rbxassetid://32328520" --Change the 32328520 to the MeshID you want.

To put the mesh "inside the script", though I don't see why you would want to, change "PARENT" to "script".

Ad

Answer this question