So, I'm trying to make some attachments for a rollercoaster system which I am currentley building but, the code is failing to create them and put them in the designated workspace.
function SetupLiftHills()
local ChainAttachment1 = Instance.new("Attachment")
ChainAttachment1.Name = "ChainAttachment1"
ChainAttachment1.Parent = game.Workspace.Ride.Chains.LiftHill.Chain.Start
print("Created Successfully")
local ChainAttachment2 = Instance.new("Attachment")
ChainAttachment2.Name = "ChainAttachment2"
ChainAttachment2.Parent = game.Workspace.Ride.Chains.LiftHill.Chain.End
print("Created Successfully")
end
I only typed this for executing the code and I feel that is where the problem is or it might be my code itself.
SetupLiftHills()
I am firing the code as I have added a statement right at the bottom of my code which specifies the function but, it doesn't appear to run at all.

4 comments
Excellent news, the code you provided has fixed my problem. I have modified the code slightly but, it still prodcues the results I needed. Thank you again and I've marked you as the solution to the question.
I do have a query though as I need to create quite a lot of attachments for this ride system. Is there an easier solution to creating attachments? Instead of creading seperate statements to create attachments.
I will modify the answer for your needs
Appreciate it. Thank you very much :)