Skip to content

Commit 922c1fc

Browse files
Update README.md
1 parent 53b2bf8 commit 922c1fc

File tree

1 file changed

+0
-312
lines changed

1 file changed

+0
-312
lines changed

README.md

Lines changed: 0 additions & 312 deletions
Original file line numberDiff line numberDiff line change
@@ -34,324 +34,12 @@ Follow on [FastCast2 devforum](https://devforum.roblox.com/t/fastcast2-an-improv
3434
> [!NOTE]
3535
> - I still have not finished making the API Usage, README.md 100% yet
3636
37-
## How to install
38-
1. Go to the toolbox
39-
<img width="43" height="51" alt="Screenshot 2026-01-04 012731" src="https://github.com/user-attachments/assets/41851631-06cf-4ab3-a2cc-d1af66c317ef" />
4037

41-
2. Inside the toolbox, model tab. Search for "FastCast2"
42-
<img width="292" height="36" alt="Screenshot 2026-01-04 012824" src="https://github.com/user-attachments/assets/c1010991-f481-405d-b9e6-9230cd2104ac" />
4338

44-
3. You should see FastCast2 and then click it
45-
<img width="275" height="330" alt="Screenshot 2026-01-04 012904" src="https://github.com/user-attachments/assets/d1252231-834a-4407-b2bb-facdd18ffd06" />
4639

47-
4. Make sure it's owned by "Mawin_CK"
48-
<img width="109" height="51" alt="Screenshot 2026-01-04 012926" src="https://github.com/user-attachments/assets/b10dd12b-e389-41d7-b72f-1eb291c492f3" />
4940

50-
5. Insert into the studio
51-
<img width="273" height="48" alt="Screenshot 2026-01-04 012943" src="https://github.com/user-attachments/assets/1586939e-1627-4b22-8a42-c1c149f54bf7" />
5241

53-
6. If you're seeing this. Click "OK"
54-
<img width="494" height="150" alt="Screenshot 2026-01-04 013009" src="https://github.com/user-attachments/assets/87abd09c-69c8-4e77-8327-a3c192626de7" />
5542

56-
7. Now you will see "FastCast2" inside the workspace. Drag it into ReplicatedStorage
57-
<img width="201" height="126" alt="Screenshot 2026-01-04 013047" src="https://github.com/user-attachments/assets/88ec449a-ee11-4930-8775-c9deb5453264" />
58-
59-
<!-- 8. Make sure inside the FastCast2. The "ClientVM" and "ServerVM" path is correct
60-
<img width="185" height="298" alt="Screenshot 2026-01-04 013134" src="https://github.com/user-attachments/assets/9910a3bd-1705-43ce-8c50-4cab0f096146" />
61-
<img width="449" height="49" alt="Screenshot 2026-01-04 013203" src="https://github.com/user-attachments/assets/cf4355d9-9faf-432c-9fde-7ed9b8b1675b" />
62-
-->
63-
64-
8. Insert a part into the workspace and then rename it to "Projectile" and set its size to 1,1,1, and make sure "CanCollide", "CanQuery", "CanTouch" are all unmarked. And drag it into ReplicatedStorage
65-
<img width="194" height="59" alt="Screenshot 2026-01-04 013358" src="https://github.com/user-attachments/assets/19be90fd-66ce-4cf5-849d-ab84d718edd8" />
66-
67-
(If you dont found FastCast2 in the toolbox, click this link: https://create.roblox.com/store/asset/87459814880446/FastCast2)
68-
69-
## Testing
70-
- To test if FastCast2 actually works. Insert a "LocalScript" Inside "StarterCharacterScripts" and paste this code :
71-
72-
```lua
73-
--[[
74-
- Author: Mawin_CK
75-
- Date: 2025
76-
]]
77-
78-
-- Services
79-
local Rep = game:GetService("ReplicatedStorage")
80-
local RepFirst = game:GetService("ReplicatedFirst")
81-
local UIS = game:GetService("UserInputService")
82-
local Players = game:GetService("Players")
83-
84-
-- Modules
85-
local FastCast2ModuleScript = Rep:WaitForChild("FastCast2")
86-
87-
-- Requires
88-
local FastCast2 = require(FastCast2ModuleScript)
89-
local FastCastEnums = require(FastCast2ModuleScript:WaitForChild("FastCastEnums"))
90-
local FastCastTypes = require(FastCast2ModuleScript:WaitForChild("TypeDefinitions"))
91-
92-
-- Variables
93-
local player = Players.LocalPlayer
94-
local character = player.Character or player.CharacterAdded:Wait()
95-
local Head = character:WaitForChild("Head")
96-
97-
local Mouse = player:GetMouse()
98-
99-
local ProjectileTemplate = Rep:WaitForChild("Projectile")
100-
local ProjectileContainer = workspace:FindFirstChild("Projectiles")
101-
102-
if not ProjectileContainer then
103-
ProjectileContainer = Instance.new("Folder")
104-
ProjectileContainer.Name = "Projectiles"
105-
ProjectileContainer.Parent = workspace
106-
end
107-
108-
local debounce = false
109-
110-
-- CONSTANTS
111-
local DEBOUNCE_TIME = 0.1
112-
local SPEED = 75
113-
114-
-- CastParams
115-
local CastParams = RaycastParams.new()
116-
CastParams.FilterDescendantsInstances = {character}
117-
CastParams.IgnoreWater = true
118-
CastParams.FilterType = Enum.RaycastFilterType.Exclude
119-
120-
-- Behavior
121-
local Behavior = FastCast2.newBehavior()
122-
Behavior.RaycastParams = CastParams
123-
Behavior.MaxDistance = 1000 -- Explicitly set the max distance
124-
Behavior.HighFidelityBehavior = FastCastEnums.HighFidelityBehavior.Default
125-
Behavior.Acceleration = Vector3.new(0, -workspace.Gravity, 0)
126-
Behavior.CosmeticBulletTemplate = ProjectileTemplate
127-
Behavior.CosmeticBulletContainer = ProjectileContainer
128-
Behavior.AutoIgnoreContainer = true
129-
Behavior.UseLengthChanged = false
130-
131-
-- Caster
132-
local Caster = FastCast2.new()
133-
Caster:Init(
134-
4, -- Due to roblox limits :P
135-
RepFirst, -- Where cloned FastCastVMs will be parented to
136-
"CastVMs", -- New name of cloned FastCastVMs
137-
RepFirst, -- VMs Container
138-
"CastVMsContainer", -- Name of VMs Container
139-
"CastVM", -- Name of VMs
140-
true -- useBulkMoveTo
141-
)
142-
143-
-- Event functions
144-
local function OnRayHit(cast : FastCastTypes.ActiveCast)
145-
print("Hit")
146-
end
147-
148-
local function OnCastTerminating(cast : FastCastTypes.ActiveCast)
149-
local obj = cast.RayInfo.CosmeticBulletObject
150-
if obj then
151-
obj:Destroy()
152-
end
153-
end
154-
155-
-- Listeners
156-
157-
Caster.RayHit:Connect(OnRayHit)
158-
Caster.CastTerminating:Connect(OnCastTerminating)
159-
160-
UIS.InputBegan:Connect(function(input : InputObject, gp : boolean)
161-
if gp then return end
162-
if debounce then return end
163-
164-
if input.UserInputType == Enum.UserInputType.MouseButton1 then
165-
local Origin = Head.Position
166-
local Direction = (Mouse.Hit.Position - Origin).Unit
167-
168-
Caster:RaycastFire(Origin, Direction, SPEED, Behavior)
169-
170-
debounce = true
171-
task.wait(DEBOUNCE_TIME)
172-
debounce = false
173-
end
174-
end)
175-
```
176-
- Or you can get FastCast2 testing ground from : https://github.com/weenachuangkud/FastCast2/releases
177-
178-
# API Usages
179-
180-
## Caster Methods
181-
182-
```lua
183-
FastCast.new()
184-
```
185-
Construct a new Caster instance
186-
187-
<br />
188-
<br />
189-
190-
```lua
191-
FastCast:Init(
192-
numWorkers : number,
193-
newParent : Folder,
194-
newName : string,
195-
ContainerParent : Folder,
196-
VMContainerName : string,
197-
VMname : string,
198-
199-
useBulkMoveTo : boolean,
200-
201-
useObjectCache : boolean,
202-
Template : BasePart | Model,
203-
CacheSize : number,
204-
CacheHolder : Instance
205-
)
206-
```
207-
Initialize Caster. Allocate the worker amount of `numWorkers`, rename it to `VMname`, clone `FastCastVMs` to `newParent`, rename it to `newName` , and then create a VMsContainer which is a container of workers, set its parent to `ContainerParent`, and rename it to `VMContainerName`
208-
- useBulkMoveTo: if true, will enable BulkMoveTo to handle CFrame changes for every `ActiveCast.RayInfo.CosmeticBulletObject`. Can be disabled and enabled by `Caster:BindBulkMoveTo(boolean)`
209-
- useObjectCache: if true, will permanently use ObjectCache for Caster
210-
211-
<br />
212-
<br />
213-
214-
```lua
215-
FastCast:SafeCall(f : (...any) -> (...any), ...)
216-
```
217-
Call the passed-in function if it exists
218-
219-
<br />
220-
<br />
221-
222-
```lua
223-
FastCast:BindBulkMoveTo(bool : boolean)
224-
```
225-
Enable or disable `BulkMoveTo` for `Caster`
226-
227-
<br />
228-
<br />
229-
230-
```lua
231-
FastCast:ReturnObject(obj : Instance)
232-
```
233-
Return passed-in `obj` to `ObjectCache`
234-
235-
<br />
236-
<br />
237-
238-
```lua
239-
FastCast:Destroy()
240-
```
241-
Destroy Caster
242-
243-
<br />
244-
<br />
245-
246-
```lua
247-
FastCast:RaycastFire(
248-
origin: Vector3,
249-
direction: Vector3,
250-
velocity: Vector3 | number,
251-
BehaviorData: TypeDef.FastCastBehavior?
252-
)
253-
```
254-
Create a new `ActiveCast`; it will not work if the `Caster` has not initialized
255-
256-
<br />
257-
<br />
258-
259-
```lua
260-
FastCast:BlockcastFire(
261-
origin : Vector3,
262-
Size : Vector3,
263-
direction : Vector3,
264-
velocity : Vector3 | number,
265-
BehaviorData: TypeDef.FastCastBehavior?
266-
)
267-
```
268-
Create a new `ActiveBlockCast`; it will not work if the `Caster` has not initialized
269-
270-
## Caster Signals
271-
272-
```lua
273-
Caster.RayHit(
274-
ActiveCast,
275-
RaycastResult,
276-
segmentVelocity : Vector3,
277-
cosmeticBulletObject : Instance?
278-
)
279-
```
280-
Fires every RayHit
281-
282-
<br />
283-
<br />
284-
285-
<br />
286-
<br />
287-
288-
```lua
289-
Caster.LengthChanged(
290-
ActiveCast,
291-
lastPoint : Vector3,
292-
rayDir : Vector3,
293-
rayDisplacement : number,
294-
segmentVelocity : Vector3,
295-
cosmeticBulletObject : Instance?
296-
)
297-
```
298-
Fires every LengthChanged
299-
> [!WARNING]
300-
> - Very performance-heavy when many projectiles are active
301-
> - Deprecated api
302-
303-
<br />
304-
<br />
305-
306-
```lua
307-
Caster.CastTerminating(ActiveCast)
308-
```
309-
Fires every CastTerminating
310-
311-
<br />
312-
<br />
313-
314-
```lua
315-
Caster.CastFire(
316-
ActiveCast, Origin : Vector3,
317-
Direction : Vector3,
318-
Velocity : Vector3,
319-
behavior : FastCastBehavior
320-
)
321-
```
322-
Fires if `ActiveCast` is created successfully before the RunService
323-
324-
<br />
325-
<br />
326-
327-
```lua
328-
FastCast:SetCanPierceModule(moduleScript: ModuleScript?)
329-
```
330-
Sets the CanPierceModule for the Caster
331-
332-
<br />
333-
<br />
334-
335-
```lua
336-
FastCast:SetBetterLengthChangedModule(moduleScript: ModuleScript)
337-
```
338-
Sets the BetterLengthChangedModule for the Caster.
339-
340-
<br />
341-
<br />
342-
343-
```lua
344-
FastCast:SetObjectCacheEnabled(
345-
enabled: boolean,
346-
Template: BasePart | Model,
347-
CacheSize: number,
348-
CacheHolder: Instance
349-
)
350-
```
351-
Sets whether ObjectCache is enabled for this Caster.
352-
353-
<br>
354-
<br>
35543

35644
# People behind FastCast2
35745
- [Mawin CK](https://github.com/weenachuangkud): Main developer, Graphic designer

0 commit comments

Comments
 (0)