Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I was wondering if someone could assist me with a regen part script (regen with a players username)?

Hello I have little scripting knowledge but I was just wondering if anyone could help me with a Regen script. This will be for a building game with the F3X building tools that has a permissions system. The permissions only allow players to change part's called ("BlobbyblobBuild_" .. then their username). I would really like for the Part that has a motor on it (F3X doesnt support Motors export and importing) to regen with the players name that touched the regen block so that other players cannot move around this part.

this is the current script that I have (its just a fm)

system = script.Parent

model = system.Station1

backup = model:Clone()

regen = system.Regen



function checkRegen()

	if regen.Value == 1 then

		model:remove()

		wait(1)

		model = backup:Clone()

		model.Parent = system

		model:MakeJoints()

	end

end

regen.Changed:connect(checkRegen)
  • Ant4rctica

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.