hello,
I need help with my revive system (the issue is stated in the title), i tried searching the solution in DevForum, but couldn’t find one.
how it works is simple, hold R nearby a downed player.
help will be appreciated!
--// Local Script
local HRPCFrame = character:WaitForChild("HumanoidRootPart").CFrame * CFrame.new(0, 0, 0).Position
uis.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.R and not debounce and canRevive and character:FindFirstChild("HumanoidRootPart") then
reviveRemote:FireServer(HRPCFrame, "Start")
print("yes")
debounce = true
elseif not character:FindFirstChild("HumanoidRootPart") then print("no")
end
end)
--// Server Script
reviveRemote.OnServerEvent:Connect(function(plr, hrp, request)
local region3 = Region3.new(hrp - CFrame.new(2, 2, 2).Position, hrp + CFrame.new(2, 2, 2).Position) --// The Error
local region= workspace:FindPartsInRegion3(region,nil,20)
--// Local Script
local HRPCFrame = CFrame.new(character:WaitForChild("HumanoidRootPart").CFrame * CFrame.new(0, 0, 0).Position)
uis.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.R and not debounce and canRevive and character:FindFirstChild("HumanoidRootPart") then
reviveRemote:FireServer(HRPCFrame, "Start")
print("yes")
debounce = true
elseif not character:FindFirstChild("HumanoidRootPart") then print("no")
end
end)
and why do you have ‘region’ and not ‘region3’ in ‘FindPartsInRegion3’ in server script?