Hello! Recently I came across a problem with a script of mine.
I have a local script that basically kicks out exploiters that attempt some flying methods…
local Username = script.Parent.Parent.Parent.Name
local Player = game.Players:FindFirstChild(Username)
local Character = game.Workspace:FindFirstChild(Username)
local HumanoidRootPart = Character:WaitForChild ("HumanoidRootPart")
local UpperTorso = Character:WaitForChild ("UpperTorso")
local LowerTorso = Character:WaitForChild ("LowerTorso")
HumanoidRootPart.ChildAdded:Connect(function(Object)
if Object.ClassName == "BodyGyro" or Object.ClassName == "BodyPosition" or Object.ClassName == "BodyVelocity" then
Object:Destroy()
Player:Kick("Kicked due to unexpected client behavior")
end
end)
UpperTorso.ChildAdded:Connect(function(Object)
if Object.ClassName == "BodyGyro" or Object.ClassName == "BodyPosition" or Object.ClassName == "BodyVelocity" then
Object:Destroy()
Player:Kick("Kicked due to unexpected client behavior")
end
end)
LowerTorso.ChildAdded:Connect(function(Object)
if Object.ClassName == "BodyGyro" or Object.ClassName == "BodyPosition" or Object.ClassName == "BodyVelocity" then
Object:Destroy()
Player:Kick("Kicked due to unexpected client behavior")
end
end)
Basically I would replace the local script with a server script for instance, and nothing would happen, I was reading my code and couldn’t figure out the reason, I even tried creating another script that Should make this work server-sided, and it still doesn’t work, any thoughts?