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

Does anyone know how to make a pet game pass that you can equip or unequip?

Asked by 7 years ago

I need help with scripting a game pass where you can buy a pet that follows you,and that you can equip/unequip.If someone could help me that would be great.thank you.

0
Do you know how to script? GingeyLol 338 — 7y
0
Very little to none Faze360noscope1017 0 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Sorry i don't know how to script a gamepass but I can give a scrip that will allow your pet to follow anyone who is in range :-

01local larm = script.Parent:FindFirstChild("Left Arm")
02local rarm = script.Parent:FindFirstChild("Right Arm")
03 
04function findNearestHead(pos)
05    local list = game.Workspace:children()
06    local torso = nil
07    local dist = 25
08    local temp = nil
09    local human = nil
10    local temp2 = nil
11    for x = 1, #list do
12        temp2 = list[x]
13        if (temp2.className == "Model") and (temp2 ~= script.Parent) then
14            temp = temp2:findFirstChild("Head")
15            human = temp2:findFirstChild("Humanoid")
View all 33 lines...

And here is the respawn script:-

01name="Humanoid"
02local waittime = 1 --Set amount of time to wait before respawn
03robo=script.Parent:clone()
04 
05while true do
06    wait(waittime)
07    if script.Parent.Humanoid.Health<1 then
08        robot=robo:clone()
09        robot.Parent=script.Parent.Parent
10        robot:makeJoints()
11        script.Parent:remove()
12    end
13end

hope it help, sorry I am new to scripting so i don't know to program a gamepass

Ad

Answer this question