im following the tutuorial but the top of the bouncePad doesnt anchored itself. In the video , the bouncePad anchored itself because there’s an attachment.
there are no error and i can bounce on it but theres no bounce effect and the top part doesnt anchored
local collectionService = game:GetService("CollectionService")
local replicatedStorage = game:GetService("ReplicatedStorage")
local boingSFX = replicatedStorage:WaitForChild("SFX"):WaitForChild("BounceSFX")
local jumpForce = 1500
local springLength = 5
local localPlayer = game.Players.LocalPlayer
for _, pad in pairs(collectionService:GetTagged("BouncePad")) do
local bottom = pad:WaitForChild("Bottom")
local spring = bottom:WaitForChild("SpringConstraint")
local hitBox = pad:WaitForChild("HitBox")
pad:SetAttribute("isTouched", false)
hitBox.Touched:Connect(function(otherPart)
local humanoid = otherPart.Parent:FindFirstChildWhichIsA("Humanoid")
if humanoid and not pad:GetAttribute("isTouched") and otherPart.Parent.Name == localPlayer then
pad:SetAttribute("isTouched", true)
otherPart:ApplyImpulse(Vector3.new(0, jumpForce, 0))
boingSFX:Play()
spring.FreeLength = springLength
wait(0.5)
spring.FreeLength = 0.1
pad:SetAttribute("isTouched",false)
end
end)
end
So there’s a Spring between the Bottom and the top.
As you can see in the script the spring.FreeLength is being set to different lengths to bounce the player.
It looks like you have the SpringConstraint Attachments set sideways instead of vertically because I can see the spring facing sideways instead of up and down.
In the Explorer window please show us a picture of how you have this set up as well as the Properties of the SpringConstraint.
There’s a great tool for telling the alignment of Attachments and Constraints. In the Studio Model tab look at the Constraints tab and click the Show Constraints and Draw on top tools.
And post a link to whatever tutorial you are using because we can’t know anything about what it tells you to do.
The PrismaticConstraint (the brown square around the green sphere attachment) is supposed to be flat facing upward. In your picture it’s flat facing left and right.
There should only be 2 Attachments in this setup. One in the bottom pad and one in the top pad.
Select each green sphere and it’ll show you yellow and orange arrows for alingnment.
Align the yellow arrows upward in both Attachments so the PrismaticConstraint slides up and down, and make sure the orange arrows face the same direction, or when you test or play the game the attachments will try to realign themselves to each other.
Attach the SpringConstraint to the same green spheres that the PrismaticConstraint uses.
This should have all been explained in the video, but apparently the alignment of the Attachments wasn’t.
im sorry for my misinformation, im saying this part wont work like on the video
the top part supposed to be bounces up. but mine dont do that…
also im bad at giving information sorry about that…