When I was trying out RemoteEvent/Functions, I watch a tutorial, and then had at it. I don't know how I can use it, and why I need to, however. When I was trying to get my block to do damage after the player shoots it out, the block doesn't, yet I've heard that I need RemoteEvent/Functions to make it do damage. Can anyone explain why I need it, or what i'm doing wrong? The output keeps saying "RemoteEvent is not a valid member of ReplicatedStorage".

Water Shooter Code-

local Water = game.ReplicatedStorage.Water
local Shooter = script.Parent
local Waterclone = Water:Clone()
local Enabled = false
local person = game.Players.LocalPlayer
local mouse = person:GetMouse()
local Cooldown = wait (.8)
local ReplicatedStorage = game:GetService("ReplicatedStorage")

Shooter.Unequipped:Connect(function()
	if Enabled then 
		
	 Enabled = false
	
	end
end)

Shooter.Equipped:Connect(function()
	if Cooldown then
	wait(.1)
	Enabled = true
	end
end)

local function onclick()
	
	if Enabled then
		Enabled = false
	
	if person.Character ~= nil then
		
	Waterclone.Parent = game.Workspace
	Waterclone:MoveTo(person.Character:FindFirstChild('RightLowerLeg').Position)
	
	wait(.8)
	Waterclone.Parent = nil
	Enabled = true
    end
end
end

mouse.Button1Down:Connect(onclick)


	
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect()


	hit.Parent.Humanoid.WalkSpeed = 10 
	hit.Parent.Humanoid:TakeDamage (4)
	wait(.8)
	hit.Parent.Humanoid.WalkSpeed = 16

Water Blast Code-

local Water = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")

Water.Touched:Connect(function(hit)

if hit.Parent ~= game.Players.LocalPlayer.Charactor and hit.Parent:FindFirstChild("Humanoid") then

game.ReplicatedStorage.RemoteEvent:FireServer()


end
end)

3 comments

0

Is there actually a Remote Event in Replicated Storage named “RemoteEvent”?

0

.... I, am dumb. I'll see if that is the fix, im so sorry

0

Thank you! If there are anymore problems, i'll come back and ask.