Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago

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

Log in to vote
0
Answered by 6 years ago

Nevermind I got it figured out

Ad

Answer this question