I followed a tutorial but tried something different, it works fully functionally in FE but only in test mode. When I use it ingame nothing happens, can y'all tell me if anything is wrong here? (this is a script in a tool btw)
local Tool = script.Parent
play = Tool.Parent.Parent
char = play.Character
hum = char.Humanoid
root = char.HumanoidRootPart
Fist = script.Parent.Handle
local en = true
Tool.RemoteEvent.OnServerEvent:connect(function(play,mousehit)
hum.JumpPower = 300
hum.Jump = true
local a = hum:LoadAnimation(Tool.Punch)
a:Play()
root.CFrame = CFrame.new(root.Position,root.Position + Vector3.new(mousehit.lookVector.x,0,mousehit.lookVector.z))
wait(0.7)
local bp = Instance.new("BodyPosition",char.Torso)
bp.Position = mousehit.lookVector * 200
bp.MaxForce = Vector3.new(40000,40000,40000)
local ten = true
Fist.Touched:connect(function(hit)
if not ten then return end
ten = false
if hit.Anchored == true and hit.CanCollide == true then
local ehum = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
local dust = Fist:Clone()
for i,v in pairs(dust:GetChildren()) do
if v:IsA("ParticleEmitter") then
v:Destroy()
end
end
dust.Transparency = 0.2
dust.Name = "Snap"
dust.Size = Vector3.new (120,120,120)
dust.Anchored = true
dust.CanCollide = false
dust.Parent = game.Workspace
local bang = Instance.new ("Sound")
bang.SoundId = "rbxassetid://1421442974"
bang.Volume = 10
bang.Looped = false
local mesh = Instance.new ("SpecialMesh")
mesh.MeshId = "rbxassetid://1095708"
mesh.Parent = dust
spawn(function()
while true do
wait()
mesh.Scale = mesh.Scale + Vector3.new(7,7,7)
dust.Transparency = dust.Transparency + 0.005
end
end)
hum.JumpPower = 50
game.Debris:AddItem(dust,7)
game.Debris:AddItem(bang,7)
game.Workspace.Sound.Playing = true
for i,v in pairs(char.Torso:GetChildren()) do
if v:IsA("BodyPosition") then
v:Destroy()
a:Stop()
for i,v in pairs(game.Players:GetPlayers()) do
if v.Name ~= "SirTottenhamcake" then
v.Character.Humanoid.Sit = true
end
end
end
end
end
end)
end)

2 comments
Test Mode will put the server and client in one place. It's not entirely reliable for testing scripts for a filtering enabled settings. Try Server Test mode for testing Filtering Enabled Environments. https://i.imgur.com/6mZVBH6.png
I did try that, that is when I noticed that the script didn't work.