local Info = TweenInfo.new(10,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out,0,false,0)
local Sound = script.Parent.explode3
local tween = game:GetService("TweenService")
Block.Touched:Connect(function(hit, player)
local humanoid = hit.Parent:WaitForChild("Humanoid")
if hit.Parent:FindFirstChild("Humanoid") then
script.Enabled = false
local animator = Instance.new('Animator')
animator.Parent = humanoid
local animation = script.Parent.Animation
humanoid.WalkSpeed = 0
local LoadAnim = animator:LoadAnimation(animation)
LoadAnim:Play()
wait(2.6)
local Torso = humanoid.Parent:FindFirstChild("UpperTorso")
local Ball = Instance.new("Part")
Ball.Shape = Enum.PartType.Ball
Ball.CanCollide = false
Ball.Position = Torso.Position
Ball.Parent = Torso
Ball.Anchored = true
Ball.Color = Color3.new(1, 1,0)
Ball.Material = Enum.Material.Neon
Sound:Play()
local Size = {Size=Vector3.new(50,50,50)}
local TweenCreate = tween:Create(Ball,Info,Size)
TweenCreate:Play()
humanoid.WalkSpeed = 16
wait(3)
for i = 0, 1, 0.1 do
wait(0.1)
Ball.Transparency = i
end
wait(10)
script.Enabled = true
end
end
end
end)
#How do I make a fireball not damage me?
131 messages · Page 1 of 1 (latest)
add a creator tag and make in touched if creator = name of touched parent then dont do damage
ty
np
yea
So I do another function?
ball.touched:connect(function(hit,plr) if "creator tag value" == "plr name" then else "damage code" end end)
yes
also do denounce
cuz it will damage every time it hits another part
ooh ok
cooldown thingy
ok ty
np*
😻
So? creator = plr.Name
I could not understand
oooh ok
string value
in ball
ok
Like this?
local Creator = Instance.new("StringValue")
Creator.Parent = Ball
Creator.Value = plr.Name
if Creator.Value == plr.Name then
else
local humanoid = hit.Parent:FindFirstChild("Humanoid")
humanoid.Health -= 25
end
end)```
yeah but you forgot debouce
this script will insta kill a player
ye ye i know
but the output sai this
** You are now Level 3! **
do you have some kind sort of
xd
it won't wort bc of 2 reasons
I only have 1 week of programming
hum
you need to set the creator
But isn't it already defined?
but the toucher of ball is a guy who doesnt own a ball right?
uh no?
ye
Creator.Value = player.Name ?
ok
uh btw can you give the explorer thingy where script is located
Sorry if I misunderstood
hm
it will just roll and damage i guess
By the way, I had heard about a thing called IsDescendantOf
Anyway, I'll have to leave, maybe later I'll try to sort this out. Thanks a lot for the help

np.
idk how to use it
hope you get better at scripting
Ty
Take it literally
Like if the script is a descendant of a part, then you do stuff
if IDO then
** You are now Level 4! **
Yes, but like I said, I've only heard about it, I have no idea how to use it.
And there are not so many roblox studio tutorials here
Ball.Touched:Connect(function(hit)
local e = hit.Parent
local ehum = e.Humanoid
if e.Name == Creator.Value then return end
ehum:TakeDamage(25)
end
where?
a]
i see
replace the current touched script with that
ok, wait a minute
and the creator value is
wdym
oh ok
replace creator.value with Player.Name
youre making a useless value
if you already have the plr
oh ok
like this?
no
remove the local creator
replace creator.value in the .touched script with player.name
bruh
replace the entire .Touched script with this
Ball.Touched:Connect(function(hit)
local e = hit.Parent
local ehum = e.Humanoid
if e.Name == Player.Name then return end
ehum:TakeDamage(25)
end
sure
** You are now Level 4! **
Sorry if I misunderstood something, I'm not fluent
Block.Touched:Connect(function(hit)
local player = hit.Parent
local humanoid = player.Humanoid
rest of script blah blah blah
end
it should work now
nice
Thank you for your help