You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to not create a hitbox if player’s stun attribute == true but idk how
What is the issue? Include screenshots / videos if possible!
This doesn’t work
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
I tried a lot but nothing worked
-- Player Information
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Animator = Humanoid:WaitForChild("Animator")
local RootPart = Character:WaitForChild("HumanoidRootPart")
local Stun = Humanoid:GetAttribute("Stun")
print(Stun)
if Stun == false then
-- this is how i set it up
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local Hum = Character:WaitForChild("Humanoid")
Hum:SetAttribute("Stun", false)
end)
end)
You already did it in the first script you sent, but some code is missing at the end
-- Player Information
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Animator = Humanoid:WaitForChild("Animator")
local RootPart = Character:WaitForChild("HumanoidRootPart")
local Stun = Humanoid:GetAttribute("Stun")
if Stun == false then
print("Humanoid is nos stun")
elseif Stun == true then
print("Humanoid is stun")
else
print("Attribute Stun doesn't exists in Humanoid")
end