Hi devs i looking for a way to send 2 variables through 1 event this is my script\s currently
--local
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character
local thun = game:GetService("ReplicatedStorage").Thunder
local Tool = char:WaitForChild("dash")
local mouse = plr:GetMouse()
local Camera = game.Workspace.CurrentCamera
mouse.Button1Down:Connect(function()
if Tool then
angle = Camera.CFrame.LookVector.Unit * 100
print(angle)
print("hello")
thun:FireServer(plr, angle)
print("fire")
end
end)
/
--Server
local thun = game:GetService("ReplicatedStorage").Thunder
thun.OnServerEvent:Connect(function(plr, angle)
local char = plr.Character
print(angle)
local ray = Ray.new(char.Position, angle)
local hit, position = game.Workspace.FindPartOnRayWithIgnoreList(ray, {char})
if hit then
print("oof")
local Rham = hit.Parent:FindFirstChild("Humanoid")
if Rham then
Rham.Health -= 50
print("hit!")
end
end
end)