#Moving hitbox
1 messages · Page 1 of 1 (latest)
I am pretty sure there is a post on DevForum is explaining how.
And also, a hitbox is basically making a part that's acts like a hitbox
Alright thx I’ll check into that
Script.paremt
Anyone got more ideas?
?
This is the general idea.
Scipr.parnt
Yeah and more…?
He is trolling you.
Yeah I know but I like to find more about it myself. The quickest way to learn
I can't imagine that you would actual fall for it
Do you know how to script?
Yes
I’ve tried welds
Moter 6D
But it just gives bugs
Send me your code.
so this this is the fireserver event
UIS.InputBegan:Connect(function(I,E) -- checkt of je niet aan het typen bent in de chat
if I.KeyCode == Enum.KeyCode.Three then -- nu gaat er iets gebeuren als je muis 1 clikt
if E then return end
if character:FindFirstChild("Stunned") then return end
if special2cooldown == false then
game.ReplicatedStorage.MainEvent:FireServer("three")
Tornado:play()
wait(0.65)
special2cooldown = true
wait(1)
special2cooldown = false
end
end
end
and then i got
Oh boy.
You aren't using the task.libray.
no man i started from a youtube tutorial
I highly recommened you use that.
and for the server script i got this:
elseif Argument == "three" then
spawn(function()
plr.Character.Humanoid.WalkSpeed = 16 -- zorgt voor een stun nadat je hebt geslagen
task.wait(0.1)
plr.Character.Humanoid.WalkSpeed = 16
end)
local hrp = plr.Character:FindFirstChild("HumanoidRootPart")
local hitbox = Instance.new("Part")
hitbox.Anchored = false
hitbox.Size = Vector3.new(5, 10, 5)
hitbox.Transparency = 0.5
hitbox.BrickColor = BrickColor.new("Really red")
hitbox.CanCollide = false
hitbox.CFrame = hrp.RootAttachment.WorldCFrame
hitbox.Parent = workspace -- altijd in Workspace voor physics stabiliteit
-- WeldConstraint zodat hij meebeweegt
local weld = Instance.new("WeldConstraint")
weld.Part0 = hitbox
weld.Part1 = hrp
weld.Parent = hitbox
game.Debris:AddItem(hitbox, 1)
local WaterTornadoVFX = game.ReplicatedStorage.VFX.WaterTornadoVFX:Clone()
local rootAttachment = hrp:FindFirstChild("RootAttachment")
spawnVFX(game.ReplicatedStorage.VFX.WaterTornadoVFX, hrp.CFrame)
wait() could get deprecated and it's pretty old.
local hitboxcooldown = false
hitbox.Touched:Connect(function(hit)
if hit.Parent ~= plr.Character and hit.Parent:FindFirstChild("Humanoid") then
if hitboxcooldown == true then return end
hitboxcooldown = true
hit.Parent:FindFirstChild("Humanoid"):TakeDamage(10)
if cooldown == true then return end
if lastcooldown == true then return end
spawn(function()
cooldown = true
cooldown = false
end)
local BV = Instance.new("BodyVelocity")
BV.MaxForce, BV.Velocity = Vector3.new(5e4, 5e2, 5e4), plr.Character.HumanoidRootPart.CFrame.LookVector * 10
BV.Parent = hit.Parent.HumanoidRootPart
game.Debris:AddItem(BV, 0.16)
local bool = Instance.new("BoolValue") -- dit geeft een boolvalue aan de enemy, die stun heet
bool.Name = "Stunned"
bool.Parent = hit.Parent
game.Debris:AddItem(bool,1)
task.wait(1) -- !nog wellicht veranderen
hitboxcooldown = false
wait(5)
if hitbox then
hitbox:Destroy()
end
end
end)
end
end)
so what do you use now?
ohw okay okay
for my self man
just wanting to know what does what
for easy editing
and still learning
Okay, it is generally a good practice when you are in a team, but sure.
And I don't recommend you learn scripting in youtube.
I will suggest you a really good course.
sure man thx
It will make you from beginner to pro.
ill check into that later
I want you to help yourself on it.
When you want to create a hitbox.
You need to create an Instance
Like this: Instance.new()
i know
Inside of the params add "Part"
instance.new("Part")
Set the size to what ever you like
And the positon should be set to the tools handle
And check the Vectors positon a little bit forward
And get the players mouse
i want the position to the character
so plr.Character.HumanoidRootPart
i did that
everything
i even tried allign position
but that is to slow
even with max power
@pulsar scaffold you there?
found a easy fix