[FastCastRedux] RayHit won't allow re-parenting of script inside of it because of sandboxing

I came across to same issue as last night I posted about the BindableEvent not firing inside a RayHit function because of Sandboxing and then I “solved” it by setting the Sandboxed mode of that BindableEvent (it’s not safe to do that).

Now, it seems even re-parenting something like Script is also not allowed.

Caster.RayHit:Connect(function(activeCast, result)
	local userData = activeCast.UserData

    if toolSettings.FreezingBullet then
		local icifyChance = math.random(1, 100)
		if toolEffects then
			local icifyEffects = toolEffects.IcifyEffect
			if icifyEffects then
				local icifyScript = icifyEffects:FindFirstChild("IcifyScript")
				if icifyScript then
					if icifyChance <= toolSettings.IcifyChance then
						if character then
							local debuff = character:FindFirstChild(icifyScript.Name) or icifyScript:Clone()
							debuff.Disabled = false
							debuff.Parent = character
						end
					end
				end
			end
		end
	end
end)

Actual error:

Im going insane on how to fix this. cant do event firing and now cant do script parent manipulation. what are the workarounds of this?

Ok, somehow this is the current fix for the sandboxing issue of internal modules of FastCastRedux:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.