Ccreate bouncing effect

hello. i want to make the tool reacto to the zone aswell as achieve the viewe effect when hitting. how would i do that?

please provide code examples!

8 Likes

As a developer, I would guess they Duplicated the model, make every part this Gold-Yellow and
0.1-0.3 transparent part, and expanded the size of the model, and used tweens on the Transparency of each part to make them invisible as they grew, to then destroying once invisible. You can learn about TweenService here on the roblox docs page as TweenService is what you would use probably the most.

4 Likes

-after that loop through each child of the model and tween the size and transparency
Size can be * 1.1 of the original size and the transparency should be 1 at the end

you can tinker with the easing style and get something similar to the effect that they have made

2 Likes

code example required, solution not approved

1 Like
1 Like

Move gui (need help) please look at this for more information

1 Like

Here’s the code but please try learning yourself since being spoon fed is not a way to learn

I’ve also commented what each sections does so that you can understand

local BounceInfo = TweenInfo.new(
	0.5,
	Enum.EasingStyle.Linear
)
local TweenService:TweenService = game:GetService("TweenService")

function BounceEffect(Model:Model)
	--Clone the model, so that we can add the effect on the clone
	local BounceModel = Model:Clone()
	BounceModel.Parent = Model.Parent
	
	--Loop through the children of the model to change their color and tween them
	for _, Child:BasePart in BounceModel:GetDescendants() do 
		if not Child:IsA("BasePart") then Child:Destroy(); continue end
		--Change the color and material to the desired effect
		Child.Material = Enum.Material.Plastic
		Child.Color = Color3.new(1, 1, 0)
		--For the effect to not interfere with the player, make it uncollidable
		Child.CanCollide = false
		
		local Tween = TweenService:Create(Child,BounceInfo, {Transparency = 1, Size = Child.Size * 1.5})
		Tween:Play()
	end
	
	--wait for everything to finish and clean up the model
	task.wait(BounceInfo.Time)
	BounceModel:Destroy()
end

I’ve tested it pretty thoroughly, so it should work

next time I would recommend trying to make something yourself especially if you have 10 years of experience in scripting :slight_smile:

3 Likes

Heres how it will look:

you can modify the tween info to get something that you would like and also the size multiplier

1 Like

Making a tween for fading it out aswell would probally make it even look better

Can I know what you mean by fading it out, currently I just change the transparency to 1

This is what is being changed:
{Transparency = 1, Size = Child.Size * 1.5}

Tweening to original starting size and then fading it out, ofcourse in a fast motion

1 Like

So after it got tweened bigger u tween it back down fast and fade

it doesnt look the same. also the parts dont expand correctly

1 Like


also this isnt as intended. it gets messed up in position and YES i tried it myself before.

1 Like

Can you give me the .rbxl place so i can see what you did wrong

heres the code of someone with 10 years of scripting experience:


function BounceEffect(Model)
	spawn(function()
		--Clone the model, so that we can add the effect on the clone
		local BounceModel = Model:Clone()
		BounceModel.Parent = Model.Parent

		--Loop through the children of the model to change their color and tween them
		for a,b in ipairs(BounceModel:GetDescendants())do 
			if not b:IsA("BasePart") then b:Destroy() end
			--Change the color and material to the desired effect
			b.Material = Enum.Material.Plastic
			b.Color = Color3.new(1, 1, 1)
			--For the effect to not interfere with the player, make it uncollidable
			b.CanCollide = false
			b.CanTouch = false
			b.Anchored = true

			game.TweenService:Create(b,TweenInfo.new(0.5,Enum.EasingStyle.Bounce),{Transparency = 1,Size = b.Size * 1.5}):Play()
		end

		--wait for everything to finish and clean up the model
		task.wait(0.5)
		BounceModel:Destroy()
	end)
end

script.RECIEVER.Event:Connect(BounceEffect)
1 Like

“yes, i want to achieve the exact same effect as showed in the exaple above”