Hello,
I'm new at scripting and I'm trying to make a pet GUI for my game. I've got the pet to show up and follow you around with a BodyGyro and a BodyPosition along with LocalScripts I am aware that LocalScripts are only visible to the player and not others. So I'm wondering, how would I go to make this visible to other players?
Screen Gui Script (Button)
local Pet = game.ReplicatedFirst.Part:Clone()
local Player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
Player.Parent = Player.Character
end)
Pet Script:
local Head = script.Parent.Parent:FindFirstChild("Head")
local Pet = script.Parent
while true do
wait()
local Pos = Head.CFrame * Vector3.new(2,2,2)
Head.BodyGyro.CFrame = Head.CFrame
Head.BodyPosition.Position = Vector3.new(Pos.x, Pos.y, Pos.z)
end
If I could get some help on this it would be great.
Thanks!

2 comments
just a pro tip, instead of doing while true do wait(), you can just do while wait() do
Okay, thanks!