Hey,
I’m working on an Admin panel for my game.
I’ve been searching on the dev forum for quite a while on how to fling a player but I haven’t got a solution.
I searched on google and all I found is exploit scripts.
Does anyone know how to fling a player? (R15)
local Part = script.Parent
local End = workspace.End
wait(2)
while true do
local direction = End.Position - Part.Position
local force = direction + Vector3.new(0, workspace.Gravity * 0.5, 0)
Part:ApplyImpulse(force * Part.AssemblyMass)
wait(2)
end
I’m trying to fling a player, therefore, I used HumanoidRootPart instead of “Part”:
function script.Parent.OnServerInvoke(player, Target, speaker)
local speaker = speaker
print(speaker)
local plr = Target
local character = game.Workspace:FindFirstChild(Target)
local plrHumanoid = character.Humanoid
local plrRP = character.HumanoidRootPart
local End = workspace.End
while true do
local direction = End.Position - plrRP.Position
local force = direction + Vector3.new(0, workspace.Gravity * 0.5, 0)
plrRP:ApplyImpulse(force * plrRP.AssemblyMass)
wait(2)
end
end
Happens the same thing, doesn’t work + no output shown.
This is what I have so far:
function script.Parent.OnServerInvoke(player, Target, speaker)
local plr = Target
local character = game.Workspace:FindFirstChild(Target)
local plrHumanoid = character.Humanoid
local plrRP = character.HumanoidRootPart
local RNG = Random.new()
plrRP.AssemblyLinearVelocity = RNG:NextUnitVector() * 5000
plrRP.AssemblyAngularVelocity = RNG:NextUnitVector() * 5000
end
Wait I found the problem. The server doesn’t have network ownership over the Character, and it is essentially “glued” to the ground(not sure how to explain it really). Try running it like this:`