Http requests can only be executed by game server

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
    I’m trying to make a taser, the LocalScript sends position and object data to the normal script through a RemoteEvent which is inside StarterCharacterScripts

  2. What is the issue? The scripts don’t work at all + the error in the title, don’t know why. Http Service is enabled in Game Settings.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Yes.

Local script inside tool

local tool = script.Parent
local delay1 = false
local RT = game:GetService("ReplicatedStorage")
local TaserP = RT.TaserPoints

local lplrs = game:GetService("Players").LocalPlayer
local TaserEvent = RT.TaserPoints.TaserEvent

tool.Activated:Connect(function()
	
	if delay1 == false then
		tool.Handle.Touched:Connect(function(p)
			local mouse = lplrs:GetMouse()
			print("ño")
			TaserEvent:FireServer(lplrs, mouse.Hit, script.Parent.Handle, p)
		end)
		delay1 = true
		wait(1.9)
		delay1 = false
	end
end)

Script inside StarterCharacterScripts

local rs = game:GetService("ReplicatedStorage");
local event = rs.TaserPoints.TaserEvent;

local p1, p2 = event.Parent.Part1, event.Parent.Part2;

local tevent = rs.TaserPoints.TaserEvent;
local plr = game:GetService("Players");

plr.PlayerAdded:Connect(function(p)
	local hum = p.Character:FindFirstChildWhichIsA("Humanoid")
	local oldspeed =  tostring(hum.WalkSpeed)
	
	tevent.OnServerEvent:Connect(function(plr, MouseHitPos, handle, obj)
		local CP1 = p1:Clone()
		local CP2 = p2:Clone()
		
		local weld = CP1.Weld		
		weld.Part0 = CP1
		weld.part1 = CP2
		
		CP1.Position = handle.Position
		CP2.Position = MouseHitPos.Position
		
		if obj:IsA("Humanoid") then

			hum.WalkSpeed = 0
			hum.Jump = false
			wait(3)
			hum.WalkSpeed = tonumber(oldspeed)
		end
	end)
end)

Screenshot:
image

Any type of help would be appreaciated! :hugs:

The server script has to be in server script service not in starter character scripts.

1 Like

Btw httpservice is something different than remote events and thus you can freely disable it. Cheers

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.