You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I’m trying to make a part move to another with align position on a client. -
What is the issue? Include screenshots / videos if possible!
I can get it to work if I change the attachment 1 from the server but not from a client. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have looked in the documentation, the Developer Hub and other places online for solutions but have not yet found anything helpful.
Here is the local script I am using to modify the align position
wait(5)
local event = game.ReplicatedStorage.Events.StartTutorial
local camera = game.Workspace.CurrentCamera
local cameraParts = game.Workspace.TutorialParts
local cameraPart = cameraParts.CameraPart
local isInTutorial = false
local player = game.Players.LocalPlayer
local tutorialText = player.PlayerGui:WaitForChild("Tutorial").Frame.Frame.TextLabel
local tutorialStage = 0
local coolDown = false
cameraPart.Changed:Connect(function()
if isInTutorial then
if not (camera.CameraType == Enum.CameraType.Scriptable) then
camera.CameraType = Enum.CameraType.Scriptable
end
camera.CFrame = cameraPart.CFrame
end
end)
event.OnClientEvent:Connect(function()
isInTutorial = true
player.PlayerGui.Tutorial.Enabled = true
tutorialText.Text = "Welcome to How Far Can You Explode"
cameraPart.AlignPosition.Attachment1 = cameraParts.SpawnVeiw.Attachment
coolDown = false
wait(3)
coolDown = true
while tutorialStage == 0 do
wait(0.1)
end
player.PlayerGui.Tutorial.Enabled = false
isInTutorial = false
end)
tutorialText.Parent.Next.MouseButton1Click:Connect(function()
if coolDown == true then
tutorialStage = tutorialStage + 1
end
end)