I am wondering how to save trails so that when they have brought one from the shop, they will have it even when they leave and when they die they will still have it. I have got the following script:

script.Trail.OnServerEvent:Connect(function(plr, wantedtrail)
	if plr.Character.Head:FindFirstChild("TrailAttachment0") then 
		plr.Character.Head.TrailAttachment0:Destroy()
		plr.Character.HumanoidRootPart.TrailAttachment1:Destroy()
	end
	local trail = game.ReplicatedStorage.TrailShop[wantedtrail]:Clone()
	trail.Parent = plr.Character.Head
	local at0 = Instance.new("Attachment",plr.Character.Head)
	at0.Name = "TrailAttachment0"
	local at1 = Instance.new("Attachment",plr.Character.HumanoidRootPart)
	at1.Name = "TrailAttachment1"
	trail.Attachment0 = at0
	trail.Attachment1 = at1
end)

This script removes current trail and adds it to avoid 2 trials clashing however the trails get removed when they respawn or when they leave which I dont want.

2 comments

0

t r i a l s

0

xD trials so what you need is a datastore script get one off free models I'm sure they work as experienced scripters scripted them for you.