Using RaycastHitboxV4 On The Local Script

You can write your topic however you want, but you need to answer these questions:

  1. How To Use RaycastHitboxV4 module on the local script

  2. So i was making a kill effect script and its a server sided script so i make an remote event to do it but i was stuck in the firing the remote on another ss script

Heres The script Kill Effect script

local ts = game:GetService("TweenService")
local fadeTI = TweenInfo.new(5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local particlesTI = TweenInfo.new(2, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut)
local rs = game:GetService("ReplicatedStorage")


game.Players.PlayerAdded:Connect(function(plr)
	
	plr.CharacterAdded:Connect(function(char)
		task.wait()
		local humanoid = char:WaitForChild("Humanoid")
		humanoid.BreakJointsOnDeath = false
		char.Parent = game.Workspace.Chars
	end)
end)



game.ReplicatedStorage.DiedRE.OnServerEvent:Connect(function(plr, target)
	
	local chr = target.Parent
	local humanoid = chr.Humanoid
	local gui = plr.PlayerGui.Main
	
	chr.HumanoidRootPart.Anchored = true
	
	local cloneEffect = rs.Effects.Light.Attachment:Clone()
	
	--//EffectFunction//--
	local function SnowEffect()
		local p = chr:GetDescendants()
		for _, char2 in ipairs(p) do
			if char2:IsA("BasePart") then
				char2.Anchored = true
				ts:Create(char2, fadeTI, {Color = Color3.new(0.27451, 0.65098, 0.827451)}):Play()
			end
			if char2:IsA("Shirt") or char2:IsA("Pants") then
				ts:Create(char2, fadeTI, {Color3 = Color3.new(0.27451, 0.65098, 0.827451)}):Play()
			end
			ts:Create(chr:WaitForChild("Torso"), fadeTI, {Color = Color3.new(0.27451, 0.65098, 0.827451)}):Play()
		end
		cloneEffect.Parent = chr.HumanoidRootPart
	end

	spawn(function()
		if gui.Frame:WaitForChild("Values").Effect1.Value == true then
			SnowEffect()
		end
	end)
	
	humanoid:UnequipTools()
	wait(4)
	plr:LoadCharacter()
end)

heres the local script i was testing

local plr = game:GetService("Players").LocalPlayer

script.Parent.Parent:WaitForChild("Humanoid").Died:Connect(function()
	game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
	game.ReplicatedStorage.DiedRE:FireServer()
	wait(4)
	game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
end)

heres the raycast module used ss script

local rs = game:GetService("ReplicatedStorage")
local rc = require(rs:WaitForChild("Modules").RaycastHitboxV4)

local newHitbox = rc.new(script.Parent.Handle)

newHitbox.OnHit:Connect(function(hit)
	hit.Parent.Humanoid:TakeDamage(50)
	hit.Parent.Humanoid.Died:Connect(function()
		rs.DiedRE:fir(hit)
	end)
end)

what is yo question, it seems like nothing is wrong.

1 Like

Look At my new post u understand more Kill Effect Hit Problem

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