Hey Does anyone know a alternative to boolvalues for things like stunning and if the player is blocking?
For now what I have is when a player is stunned / blocking / slowed their is a instance value (bool) that I place inside the character so I can check if they are in a certain state.
Is their a safe alternative to this that I can check on both server and client if they are stunned/ blocking / slowed
Ex.
Stun / How I handle the Stun
--Create Variables
local Time = TempTime or 1
local RemovedCheck = false
local EnemyHRP = EnemyChar
local Stun = Instance.new("BoolValue")
-- Configuring Stun
Stun.Name = "Stun"
Stun.Parent = EnemyHRP
Stun.AncestryChanged:Connect(function()
if Stun.Parent ~= Stun and RemovedCheck == false and game.Players:GetPlayerFromCharacter(EnemyChar) then
game.Players:GetPlayerFromCharacter(EnemyChar):Kick("Exploiting: No Stun. Contact our team moderation if this was a error if not appeal in our contact server")
end
end)
task.wait(Time)
RemovedCheck = true
Stun:Destroy()
local RunService = game:GetService("RunService")
local Character = script.Parent
RunService.RenderStepped:Connect(function()
if Character:FindFirstChild("Stun") or Character:FindFirstChild("eStun") then
Character.Humanoid.WalkSpeed = 0
Character.Humanoid.JumpPower = 0
else
Character.Humanoid.WalkSpeed = 16
Character.Humanoid.JumpPower = 50
end
if Character:FindFirstChild("Slowed") or Character:FindFirstChild("eSlowerd") then
Character.Humanoid.WalkSpeed = 4
Character.Humanoid.JumpPower = 25
else
Character.Humanoid.WalkSpeed = 16
Character.Humanoid.JumpPower = 50
end
end)