#when using my attack twice the first time its normal but the 2nd time it goes 1 side then switches
210 messages · Page 1 of 1 (latest)
sec
sorry for the quality idk why it did that
for thoose who didnt understnad
the first time im
shooting it
it goes normally
the 2nd time
it shoots first the direction u shot the first time then switches to normal
o sorry
local summon = script.Parent.summon
local throw = script.Parent.throw
ts = game:GetService("TweenService")
summon.OnServerEvent:Connect(function(player, char)
local projectile = game.Workspace.ball
local humrp = char.HumanoidRootPart
projectile.Parent = workspace
projectile.CFrame = char["Left Arm"].LeftGripAttachment.WorldCFrame - Vector3.new(0,0,10)
projectile.Anchored = false
local hollowscript = game.ServerScriptService["script for test ball"]["script for hollow purple"].Enabled == true
local tween = ts:Create(projectile, TweenInfo.new(0.25), {Transparency = 0})
tween:Play()
for i,v in pairs(projectile:GetChildren()) do
if v:IsA("Trail") then
v.Enabled = true
end
end
throw.OnServerEvent:Connect(function()
local bv = Instance.new("BodyVelocity", projectile)
bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
bv.Velocity = humrp.CFrame.lookVector * 250
wait(3)
bv.Velocity = Vector3.new(0,0,0)
projectile.CFrame = humrp.CFrame
local ballchildren = projectile:GetChildren()
for i,v in pairs(ballchildren) do
if v:IsA("BodyVelocity") then
v:Destroy()
projectile.Anchored = true
end
end
end)
end)
thats the first script
** You are now Level 1! **
local db = false
local dbtime = 1
script.Parent.Activated:Connect(function()
if db == false then
db = true
local summon = script.Parent.summon
local throw = script.Parent.throw
local char = script.Parent.Parent
local hum = char.Humanoid
local anim = hum:LoadAnimation(script.Animation)
anim:Play()
hum.WalkSpeed = 0
anim:GetMarkerReachedSignal("summon"):Connect(function()
summon:FireServer(char)
end)
anim:GetMarkerReachedSignal("Throw"):Connect(function()
throw:FireServer()
end)
wait(dbtime)
db = false
hum.WalkSpeed = 16
end
end)
What does the script do?
it makes the ball go and destroy
The actual velocity of the ball?
like it did on the video
Okay
Okay
Put a print statement
where
ok
the prints are
oh ops
i didnt stop
there
the prints ar
-131.0637664794922, -0, -212.89031982421875 - Server - Script:25 first
124.67882537841797, -0, -216.69146728515625
i also did it a third time and it did this
-0, -0, -250
Try instead using game.Workspace.Ball:Clone()
And then destroying the ball at the end
Because
You use the same ball each time
And I assume that when the new ball spawns, the bv of the old ball is carried on with it
ok lemme see
so uh
it did work
but it stopped destroying
so theres 1 idea in my mind
make a copy of that script but rename the ball to ball 2
so it acts the same
Ye try that
ok so
i did that
the first time it worked but the 2nd it didnt
thats because
uh
whenever
i use i
it
after 3 seconds
its programmed to
get destroyed
so i was thinking
after the
projectile:Destroy() should i add
script.disable?
** You are now Level 2! **
The script isn't in the projectile right?
If so then Disable it
i need the attack to spawn infront of the player
ame.ServerScriptService:FindFirstChild("script for test ball")["script for blackhole"].Enabled = false
this line
oop
nope
projectile.CFrame = char["Left Arm"].LeftGripAttachment.WorldCFrame - Vector3.new(0,0,10)
this one
Left arm?
yes
Hmm
it was originally a smaller attack
but i decided to make it bigger
should i do torso?
Well what do you want exactly yo happen?
so
While the animation is playing
attack spawns infront of player
and it goes
oh
while animation is happening
uh
wind up
then charge
So as soon as the tool is used, spawn it infront of player?
Send the updated of the first script
local summon = script.Parent.summon
local throw = script.Parent.throw
ts = game:GetService("TweenService")
summon.OnServerEvent:Connect(function(player, char)
local projectile = game.Workspace.ball:Clone()
local humrp = char.HumanoidRootPart
projectile.Parent = workspace
projectile.CFrame = humrp.CFrame - Vector3.new(0,0,10)
projectile.Anchored = false
projectile.Name = "ball2"
game.ServerScriptService:FindFirstChild("script for test ball")["script for blackhole"].Enabled = true
local tween = ts:Create(projectile, TweenInfo.new(0.25), {Transparency = 0})
tween:Play()
for i,v in pairs(projectile:GetChildren()) do
if v:IsA("Trail") then
v.Enabled = true
end
end
throw.OnServerEvent:Connect(function()
local bv = Instance.new("BodyVelocity", projectile)
bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
bv.Velocity = humrp.CFrame.lookVector * 250
print(bv.Velocity)
wait(3)
bv.Velocity = Vector3.new(0,0,0)
projectile.CFrame = humrp.CFrame
local ballchildren = projectile:GetChildren()
for i,v in pairs(ballchildren) do
if v:IsA("BodyVelocity") then
v:Destroy()
projectile:Destroy()
game.ServerScriptService:FindFirstChild("script for test ball")["script for blackhole"].Enabled = false
end
end
end)
end)
What about projectile.Position = Humrp.Position
Ye
well now it kills me
** You are now Level 3! **
it eats everything in its path
it works but
the thing is
it works only on 1 side
it doesnt matter how i change the x and
z
How about projectile.Position = hump.Position * hump.CFrame.LookVector
i think i should do cframe instead of position
Ye prob
nvm it eats me
this is getting very complicated
but we will figure it out eventually
projectile.CFrame = humRp.CFrame
What does this do?
Try it and tell me what happens
How
i made position + vector3.new 10,0,0
look
oh i cnat record rn
uh
a new problem occoured
or how do u say
when i do it the 2nd time
it eats me
😭
yes
ok
Cuz with positions u need to look in one direction
oh
Try this
it gave me an error
Unable to assign property CFrame. CoordinateFrame expected, got Vector3
Try + instead of *
it eats me
ball.Position = rootPart.Position + (rootPart.CFrame.LookVector * 5)
thats actually a smart move
Lol
Change the number 5
Nice
Lol
XD
well not oevr
but
now over
tysm
ill be trying to fix
the fact that it eats the floor
Okay