I would like to send a remote event to the enemy players local script.
I have no idea how Im gonna find the hit players actual player and I don’t even know if its possible
Ive looked through dev forum and it seems nobody else has posted about this.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
--Part of Local Script
elseif BlockBar.Value <= 0.1 then
print("Block Broken")
BlockBar.Value = BlockBar.Value - 0.1
game.ReplicatedStorage.BlockBreak:FireClient(idk enemy player)
local animationTrack = ehumanoid:LoadAnimation(game.ReplicatedStorage.Animations.BlockBreak)
animationTrack:Play()
local BlockBreak = game.ReplicatedStorage.Sounds.BlockBreak:Clone()
ehumanoidRP.Anchored = true
BlockBreak.Parent = Character
BlockBreak:Play()
Stunned.Value = true
ehumanoid.Parent:FindFirstChild("Data"):FindFirstChild("IsBlocking").Value = false
ehumanoid.Parent:FindFirstChild("Data"):FindFirstChild("BlockBroken").Value = true
ehumanoid:TakeDamage(30)
wait(3)
Stunned.Value = false
ehumanoid.Parent:FindFirstChild("Data"):FindFirstChild("BlockBroken").Value = false
ehumanoidRP.Anchored = false
end
---Block Local Script
local UIS = game:GetService("UserInputService")
local RS = game:GetService("ReplicatedStorage")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local IsBlocking = Character:WaitForChild("Data").IsBlocking.Value
local BlockAnimation = Character.Humanoid:LoadAnimation(game.ReplicatedStorage.Animations.Block)
local function Speed(Value, NextValue)
Character.Humanoid.WalkSpeed = Value
Character.Humanoid.JumpPower = NextValue
end
local db = false
local Stunned = Player.Character:WaitForChild("Data"):WaitForChild("IsStunned")
UIS.InputBegan:Connect(function(Input, IsTyping)
if IsTyping then return end
if Input.KeyCode == Enum.KeyCode.F and db == false and Stunned.Value == false and Character:FindFirstChild("Data"):FindFirstChild("BlockBar").Value >= 0.5 then
Speed(7,0)
local BlockSound = game.ReplicatedStorage.Sounds.Shield:Clone()
db = true
BlockAnimation:Play()
RS.Block:FireServer("On")
BlockSound.Parent = Character
BlockSound:Play()
wait(4)
db = false
end
end)
UIS.InputEnded:Connect(function(Input, IsTyping)
if IsTyping then return end
if Input.KeyCode == Enum.KeyCode.F and Character:WaitForChild("Data").IsBlocking.Value == true then
Speed(16,50)
BlockAnimation:Stop()
RS.Block:FireServer("Off")
end
end)
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character.Humanoid
local ydefaulty = 1
local intvalue = Character:WaitForChild("Data").BlockBar
local frame = player.PlayerGui.BlockBar.Background.Bar
intvalue.Changed:Connect(function()
frame.Size = UDim2.new(intvalue.Value,0,ydefaulty, 0)
end)
game.ReplicatedStorage.BlockBreak.OnClientEvent:Connect(function()
BlockAnimation:Stop()
RS.Block:FireServer("Off")
end)
Please help me I’ve been looking for answers for the whole day