Type Index Pages
No Result Found !!!
-
Instance
- GameSettings
- DebugSettings
- BodyMover
- WeldConstraint
- HttpRbxApiService
- NotificationService
- Translator
- Lighting
- Beam
- GuiService
- UserInputService
- Studio
- Plugin
- HttpService
- Mouse
- BindableEvent
- RunService
- Pages
- Humanoid
- TestService
- PathfindingService
- Chat
- NetworkPeer
- Feature
- CharacterAppearance
- Constraint
- NetworkReplicator
- JointInstance
- Light
- BasePlayerGui
- AnalyticsService
- NetworkMarker
- BinaryStringValue
- FlyweightService
- Geometry
- LoginService
- InstancePacketCache
- ThirdPartyUserService
- TouchInputService
- RuntimeScriptService
- GuidRegistryService
- PartOperationAsset
- DialogChoice
- PhysicsService
- AdService
- TextService
- MarketplaceService
- TeleportService
- Accoutrement
- GamePassService
- AssetService
- InsertService
- PointsService
- ChangeHistoryService
- ServerScriptService
- JointsService
- LogService
- InputObject
- Toolbar
- LuaSettings
- RenderSettings
- AnimationTrack
- PhysicsSettings
- NetworkSettings
- CFrameValue
- Animation
- Color3Value
- BoolValue
- BrickColorValue
- Vector3Value
- AnimationController
- BindableFunction
- Button
- Trail
- LocalizationTable
- LocalizationService
- DebuggerBreakpoint
- DebuggerWatch
- ScriptDebugger
- Animator
- Attachment
- RemoteFunction
- RemoteEvent
- PluginManager
- Camera
- Stats
- Sky
- StarterPlayer
- Dragger
- TerrainRegion
- Path
- TextFilterResult
- Dialog
- StatsItem
- GoogleAnalyticsConfiguration
- ScriptContext
- ControllerService
- CacheableContentProvider
- ReflectionMetadataClasses
- ReflectionMetadataEnums
- DebuggerManager
- GuiBase
- UIBase
- LuaSourceContainer
- GuiItem
- DataModelMesh
- ServiceProvider
- ReflectionMetadataItem
- PostEffect
- PhysicsPacketCache
- TouchTransmitter
- RobloxReplicatedStorage
- Visit
- LuaWebService
- ScriptService
- FlagStandService
- VirtualUser
- SpawnerService
- TimerService
- CookiesService
- Team
- GroupService
- StarterGear
- Message
- PlayerScripts
- Configuration
- ContentProvider
- CollectionService
- Debris
- ReplicatedFirst
- ServerStorage
- ReplicatedStorage
- Folder
- TweenService
- Players
- ContextActionService
- StarterPlayerScripts
- SoundService
- KeyframeSequenceProvider
- VRService
- PluginGuiService
- Player
- Teams
- Pose
- Keyframe
- KeyframeSequence
- IntConstrainedValue
- DoubleConstrainedValue
- ForceField
- RayValue
- Fire
- Smoke
- Sparkles
- ParticleEmitter
- IntValue
- StringValue
- NumberValue
- Explosion
- ObjectValue
- SoundGroup
- UserGameSettings
- ClickDetector
- Sound
- Selection
- BadgeService
- TaskScheduler
- GlobalDataStore
- DataStoreService
- CustomEvent
- CustomEventReceiver
- VirtualInputManager
- FunctionalTest
- TweenBase
- SoundEffect
- ReflectionMetadataEvents
- ClusterPacketCache
- PVInstance
- FaceInstance
- Controller
- ReflectionMetadataCallbacks
- ReflectionMetadataFunctions
- ReflectionMetadataYieldFunctions
- ReflectionMetadataProperties
- ReflectionMetadata
- AdvancedDragger
- HapticService
- FriendService
- GamepadService
No Result Found !!!
MeshType
The mesh that the SpecialMesh
object applies to the BasePart
depends on the MeshType property. A number of options are available.
- Brick - A block shape, equivalent to a
BlockMesh
- Cylinder - A cylinder, identical to a
Part
with aPart/Shape
of ‘Cylinder’ - FileMesh - A user uploaded Mesh, equivalent to
FileMesh
that a texture can be applied to using theFileMesh/TextureId
property - Head - A character head shape
- Sphere - A sphere shape, similar to a
Part
with aPart/Shape
of ‘Ball’ but can be freely resized on all axis - Wedge - A wedge shape, identical to a
WedgePart
- Torso - A block with sloped sides, due to be deprecated
Note, each MeshType will scale differently when using DataModelMesh/Scale
, for more information on this please see the page on DataModelMesh/Scale
.
Code Samples
Mesh VertexColor
In this code sample a BasePart
is instanced with a SpecialMesh
. The DataModelMesh/VertexColor
property of the SpecialMesh
is then animated using TweenService
.
local TweenService = game:GetService("TweenService") -- instance a part and a mesh local part = Instance.new("Part") part.Size = Vector3.new(4, 8, 4) part.Position = Vector3.new(0, 4, 0) part.Anchored = true part.CanCollide = false local mesh = Instance.new("SpecialMesh", part) mesh.MeshType = Enum.MeshType.FileMesh mesh.MeshId = "rbxassetid://1086413449" mesh.TextureId = "rbxassetid://1461576423" mesh.Offset = Vector3.new(0, 0, 0) mesh.Scale = Vector3.new(4, 4, 4) mesh.VertexColor = Vector3.new(1, 1, 1) -- parent part to workspace part.Parent = workspace -- create tweens local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out) local blackTween = TweenService:Create(mesh, tweenInfo, {VertexColor = Vector3.new(0, 0, 0)}) local redTween = TweenService:Create(mesh, tweenInfo, {VertexColor = Vector3.new(1, 0, 0)}) local greenTween = TweenService:Create(mesh, tweenInfo, {VertexColor = Vector3.new(0, 1, 0)}) local blueTween = TweenService:Create(mesh, tweenInfo, {VertexColor = Vector3.new(0, 0, 1)}) local resetTween = TweenService:Create(mesh, tweenInfo, {VertexColor = Vector3.new(1, 1, 1)}) -- animate while true do blackTween:Play() blackTween.Completed:Wait() redTween:Play() redTween.Completed:Wait() greenTween:Play() greenTween.Completed:Wait() blueTween:Play() blueTween.Completed:Wait() resetTween:Play() resetTween.Completed:Wait() wait() end
How this site use cookies
This Platform uses cookies to offer you a better experience, to personalize content, to provide social media features and to analyse the traffic on our site. For further information, including information on how to prevent or manage the use of cookies on this Platform, please refer to our Privacy and Cookie Policy.