So, I made a character customization button on the main menu of the game. When a player clicks "customize" it brings their player and camera to a podium where they can equip accessories, pants, etc to see what they look like. The only problem is, is when I asked my friend to test it with me, it teleported us both to the same podium, so I could see her and she could see me. How would I script it so it works?
script -- (inside customization button)
-- Contstants -- local Camera = game.Workspace.CurrentCamera local Player = game.Players.LocalPlayer -- Camera -- repeat wait() until Player.Character script.Parent.MouseButton1Click:connect (function () Camera.CameraType = "Scriptable" Camera.CFrame = game.Workspace.CustomizePart.CFrame script.Parent.Parent.Menus.Catalog.Visible = true script.Parent.Parent.Menus.Quick.Visible = true script.Parent.Parent.Menus.Inventory.Visible = true script.Parent.Parent.ButtonFrame.Visible = false script.Parent.Parent.Spawn.Visible = false script.Parent.Parent.CCBack.BackButton.Visible = true script.Parent.Visible = false if Player.Character and Player.Character:FindFirstChild("UpperTorso") then Player.Character.UpperTorso.CFrame = CFrame.new(-17.422, 6.052, 79.815) local controls = require(game:GetService("Players").LocalPlayer.PlayerScripts.PlayerModule):GetControls() controls:Disable() end end)
I understand the script teleports the player to the podium, but how would I make it so other players teleport to different podiums? I have no idea where to start.
easy just put local player = game.Player.LocalPlayers after the mousbutton1click part of the script thing because then it checks wat player clicked the button and only takes the 1 player not all the players
like this:
local Camera = game.Workspace.CurrentCamera -- Camera -- repeat wait() until game.Players.LocalPlayer.Character script.Parent.MouseButton1Click:connect (function () local Player = game.Players.LocalPlayer Camera.CameraType = "Scriptable"
AND THEN JUST GO ON WITH YOUR SCRIPT
and now you maybe want to make the player be the only 1 who will see his character so here is the script
script.Parent.MouseButton1Click:connect (function (player) local players = game.Players print(player.Name) print(player.Character.Name) player.Character.Archivable = true local clone = player.Character:Clone() clone.Parent = game.Workspace print(clone.Name) clone.Name = (player.Name .. "'s Clone") wait() local selection = Instance.new("SelectionBox") selection.Color3 = Color3.new(0.6,0.6,0.6) selection.Transparency = 1 selection.Name = Player.Name.."'s clone" selection.Parent = Player.PlayerGui wait() selection.Adornee = game.Workspace[clone.Name] clone:SetPrimaryPartCFrame(CFrame.new(Vector3.new(-26.732, 5.535, -102.696))) --- change to the tp position local cframe = clone.PrimaryPart.CFrame clone:SetPrimaryPartCFrame(cframe * CFrame.Angles(0, -30.97, 0)) -- change to the rotate angle
And dont teleport the real player this makes it so it clones the player
And change your script so it edits on the clone and on real the player
And here is a script so it makes all the player CanCollide = False
local PhysicsService = game:GetService("PhysicsService") local playerGroup = PhysicsService:CreateCollisionGroup("plr") PhysicsService:CollisionGroupSetCollidable("plr","plr",false) function NoCollide(model) for i,v in pairs(model:GetChildren()) do if v:IsA"BasePart" then PhysicsService:SetPartCollisionGroup(v,"plr") end end end game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(Char) Char:WaitForChild("HumanoidRootPart") Char:WaitForChild("Head") Char:WaitForChild("Humanoid") wait(.1) NoCollide(Char) end) if player.Character then NoCollide(player.Character) end end)