Type Index Pages
- BillboardGui
- CanvasGroup
- Frame
- Hint
- ImageButton
- ImageLabel
- PlayerGui
- ScreenGui
- ScrollingFrame
- StarterGui
- SurfaceGui
- TextBox
- TextButton
- TextLabel
- UIAspectRatioConstraint
- UIGradient
- UIGridLayout
- UIListLayout
- UIPadding
- UIPageLayout
- UIScale
- UISizeConstraint
- UITableLayout
- UITextSizeConstraint
- VideoFrame
- ViewportFrame
- ChangeHistoryService
- CoreGui
- DataModelSession
- DockWidgetPluginGui
- MultipleDocumentInterfaceInstance
- Plugin
- PluginAction
- PluginGui
- PluginGuiService
- PluginManager
- PluginMenu
- PluginMouse
- PluginToolbar
- PluginToolbarButton
- QWidgetPluginGui
- Selection
- StandalonePluginScripts
- StatsItem
- StudioService
- StudioTheme
No results 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 !!!
CurveSize0
Determines, along with Beam/Attachment0
the position of the first control point in the Beam’s Bézier curve.
The position of this point can be determined by the following equation:
local controlPoint1 = Beam.Attachment0.WorldPosition + (Beam.Attachment0.CFrame.rightVector * Beam.CurveSize0)
Beam Curvature
Beams are configured to use a cubic Bézier curve. This means they are not constrained to straight lines, and the curve of the beam can be modified by changing CurveSize0, Beam/CurveSize1
and the orientation of the beam’s Attachment
s.
Cubic Bézier curves are formed of four control points. They are determined as follows:
- P0: The start of the beam, the position of
Beam/Attachment0
- P1: CurveSize0 studs away from
Beam/Attachment0
, inBeam/Attachment0
’s positive X direction. - P2:
Beam/CurveSize1
studs away fromBeam/Attachment1
, inBeam/Attachment1
’s negative X direction. - P3: The end of the beam, the position of
Beam/Attachment1
The beam starts at P0, goes towards P1, and arrives at P3, from the direction of P2. The beam will not necessarily pass through P1 and P2.
See the images below for a visual demonstration.
Code Samples
Creating a Beam From Scratch
This code sample demonstrates how a Beam
effect can be created from scratch by creating a Beam
, setting all of its properties and configuring it’s Attachment
s. See below for an image of the final result:
-- create attachments local att0 = Instance.new("Attachment") local att1 = Instance.new("Attachment") -- parent to terrain (can be part instead) att0.Parent = workspace.Terrain att1.Parent = workspace.Terrain -- position attachments att0.Position = Vector3.new(0, 10, 0) att1.Position = Vector3.new(0, 10, 10) -- create beam local beam = Instance.new("Beam") beam.Attachment0 = att0 beam.Attachment1 = att1 -- appearance properties beam.Color = ColorSequence.new({ -- a color sequence shifting from white to blue ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 255, 255)) } ) beam.LightEmission = 1 -- use additive blending beam.LightInfluence = 0 -- beam not influenced by light beam.Texture = "rbxasset://textures/particles/sparkles_main.dds" -- a built in sparkle texture beam.TextureMode = Enum.TextureMode.Wrap -- wrap so length can be set by TextureLength beam.TextureLength = 1 -- repeating texture is 1 stud long beam.TextureSpeed = 1 -- slow texture speed beam.Transparency = NumberSequence.new({ -- beam fades out at the end NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1) } ) beam.ZOffset = 0 -- render at the position of the beam without offset -- shape properties beam.CurveSize0 = 2 -- create a curved beam beam.CurveSize1 = -2 -- create a curved beam beam.FaceCamera = true -- beam is visible from every angle beam.Segments = 10 -- default curve resolution beam.Width0 = 0.2 -- starts small beam.Width1 = 2 -- ends big -- parent beam beam.Enabled = true beam.Parent = att0
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.