Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What's the reason my fast cast is not running/running correct?

I am trying to make a boss fight. One of my modules fires an attack that I would like to use the module FastCast for. The issue is that my part will not actually run. The part does not move. I would greatly appreciate any help. I have the actual cast to a point where I do not see much of a difference between my FastCast and the sample lazer beam's FastCast. I have confirmed they run under the same version. I have also tried to add the boolean true to line 6 in an attempt to debug with nothing printing. My code is running all the way through, but the more I research/trouble shoot, the more it seems as if the fast cast is not running. To test, I tried both Roblox's Play feature and studio's test server with no luck occurring from either of those. This is a server ran module

local module = {}
local FastCastM = game.ServerScriptService.FastCastRedux

local BULLET_GRAVITY = Vector3.new(0, .2, 0)
local required = require(FastCastM)
local caster = required.new()

function module.FiringMahLazers()
	local Boss = game.Workspace.Boss
	
	local frontEye = Boss.FrontEye
	local backEye = Boss.BackEye
	local leftEye = Boss.LeftEye
	local rightEye = Boss.RightEye
	print("FiringLazers")
	local lazah = Instance.new("Part")
	lazah.Name = "Lazah"
	lazah.CFrame = CFrame.new(frontEye.Position, frontEye.CFrame.LookVector) 
	lazah.Anchored = true
	lazah.BrickColor = BrickColor.new("Institutional white")
	lazah.Parent = workspace

	caster:Fire(frontEye.Position, frontEye.CFrame.LookVector * 1000, Vector3.new(1000,0,0), lazah, Boss, true, BULLET_GRAVITY)
	
end

return module

1 answer

Turns out the issue was that the bullets require LengthChanged event which moves the bullet. If you come across a similar issue, I recommend you look at the laser gun script that's used as an example. When I was writing my FastCast script, I was unaware that this was a event and an event that is rather important.

1 comment

0

Bro thank you this helped

This discussion is preserved as it was. New answers, comments, and votes are closed.