Im learning about FE, so i made this FE Forcefield gui, so when you click it you get a forcefield, but your WalkSpeed and JumpPower lower for 10 seconds. It works in studio, but not online, can anyone find the problem?
local script:
script.Parent.MouseButton1Click:Connect(function() game.ReplicatedStorage.Remote:FireServer("ForceField") end)
serverscript:
debounce = false game.ReplicatedStorage.Remote.OnServerEvent:Connect(function(player, FF) if debounce then return end debounce = true if FF == "ForceField" then local player = game.Players.LocalPlayer FF = Instance.new("ForceField") local sparkles = Instance.new("Sparkles") sparkles.SparkleColor = Color3.fromRGB(255, 255, 255) sparkles.Parent = player.Character.HumanoidRootPart player.Character.Humanoid.WalkSpeed = 12.5 player.Character.Humanoid.JumpPower = 40 FF.Parent = player.Character wait(10) FF:Remove() sparkles:Remove() player.Character.Humanoid.WalkSpeed = 16 player.Character.Humanoid.JumpPower = 50 debounce = false end end)
I used a RemoteEvent.