Ok, thank you. I think so I don’t mess anything else up, i’m just going to search for ‘Regen’ in the explorer, disabled all those scripts then paste in the new one @FastAsFlash_Dev wrote, so i can keep optimised performance. Thank you all for your help!
Would you know how i can make a script inside the rides that would regen them on world startup, but only then and no other time? I only want it for a couple and not all…
Finding out which rides are broken would be a hard thing to implement. Maybe try actually regening all the rides, and see if it lags. I doubt it honestly, it’s just cloning, parenting and making joints. Also you’re gonna do it only once, and at the start of the server where there is only 1 playe, so it’s fine I think.
local folder = game.Workspace.Folder --assuming this is the folder
for i, v in pairs(folder:GetChildren()) do
v:Destroy() --v is the current ride
local back = save:Clone()
back.Parent = location
back:MakeJoints()
end
So even though the rides are grouped inside of the folder, it would still regen them? And would this script go inside of serverscriptservice? My guess is its a normal script and not local too? And finally, i assume the name of the ride groups won’t matter either?
Yeah, it’s regening everything inside the folder.
Yes, it’s a server script, as I said earlier ServerScriptService
is a nice place for server scripts.
Yeah it doesn’t matter, v
is refering to the current ride.
Ok, ill give it a go now, thank you!
This script doesn’t appear to work, there are some blue squiggles under some of it.
The error is pretty obvious. You should be in the call out for things like these. You don’t have save
and location
defined. I omitted them in the script I sent. Add those variables back.
From my original script? I’m not very good with scripting, sorry! Would this be the location
(local location = script.Parent.Parent.Parent), because surely then it would look for the parent of the parent of the parent of the script in serverscriptservice, and not the ride? Sorry again!
save
is the same, location
would become the folder now, so instead of that
back.Parent = folder
Ok, thank you so much for all your help, its been very helpful I really appreciate it!
Sorry to be back again @starmaq, and for the late reply. I have put these into the script, but still get blue underlines. I have a feeling i have done something wrong, mainly because i’m not very good with scripting, but i know small parts and it doesnt seem entirely correct. Sorry for all this, i know they are probably easy things to fix but i am not familiar with the code (I do plan on properly learning!) I am not sure what i’ve done wrong, so if you could help that would be greatly appreciated!