Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can i get a Speed Coil to work with Filtering Enabled?

I've been trying to do this ever since i woke up. Every attempt i make fails when i test it with a server. I've had small successes with the Client, but not Server

If it works with Server test i will accept the help of you.

--Local Script

local tool = script.Parent
local speedEvent = tool.SpeedEvent
local humanoid = game.Players.LocalPlayer.Character.Humanoid

local function onActivated()
speedEvent:FireServer(humanoid)
end

speedEvent.OnClientEvent:connect(function(arg)--Listener of FireClient(),just an example.
	print(arg)
	
end)

 
tool.Activated:Connect(onActivated)
-- Server Script
 
local tool = script.Parent
 
local speedEvent = tool.SpeedEvent
 
local function onSpeedEventFired(player, arg)
	if arg and arg.Name == "Humanoid" and not arg.WalkSpeed == 32 then
		tool.Handle.CoilSound:Play()		
		arg.WalkSpeed = 32
	end
end
 
speedEvent.OnServerEvent:Connect(onSpeedEventFired)

Both scripts including RemoteEvent are in the Tool

2 comments

0

With credit to you in the gamepass.

0

Scripts do not run in the client, only LocalScripts.

1 answer

✓ Accepted answer

The server script did not fire back to the client.

This discussion is preserved as it was. New answers, comments, and votes are closed.